diff --git a/app/admin.py b/app/admin.py index 4b61ea4..7619011 100644 --- a/app/admin.py +++ b/app/admin.py @@ -83,6 +83,41 @@ class RangeAdmin(admin.ModelAdmin): ) +class OrganizationAdmin(admin.ModelAdmin): + readonly_fields = ('id',) + search_fields = ['organisation_search', 'org_alpjha_search', 'organization_2', 'organization_3', 'subject'] + fieldsets = ( + (None, { + 'fields': ( + ('id', 'acronym', 'category', 'subject'), + 'organisation_english', + ('organisation_2', 'organisation_3'), + 'organisation_original', + + ('range_name_ascii', 'GMBA_v1_id', 'longitude'), + ('mother_range', 'wiki_data_id', 'area'), + ('feature', 'range_alternate_id', 'gmba_narrow'), + 'source', + 'id', + ) + }), + ('Address', { + 'classes': ('collapse',), + 'fields': ( + ('street', 'postcode', 'city'), + ('po_box', 'country', 'lat_long'), + ) + }), + ('Other details', { + 'classes': ('collapse',), + 'fields': (('tel', 'email'), + 'url', + 'tags', + ), + }) + ) + + class FieldAdmin(admin.ModelAdmin): search_fields = ['name'] @@ -140,10 +175,6 @@ class GMBAFunctionAdmin(admin.ModelAdmin): search_fields = ['gmba_function'] -class OrganizationAdmin(admin.ModelAdmin): - search_fields = ['organisation_search', 'org_alpjha_search', 'organization_2', 'organization_3', 'subject'] - - class RangeOnlineInfoAdmin(admin.ModelAdmin): search_fields = ['info_source']