Rearrange fields in OrganizationAdmin
This commit is contained in:
parent
165cbce3ed
commit
b78abafe30
1 changed files with 35 additions and 4 deletions
39
app/admin.py
39
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):
|
class FieldAdmin(admin.ModelAdmin):
|
||||||
search_fields = ['name']
|
search_fields = ['name']
|
||||||
|
|
||||||
|
@ -140,10 +175,6 @@ class GMBAFunctionAdmin(admin.ModelAdmin):
|
||||||
search_fields = ['gmba_function']
|
search_fields = ['gmba_function']
|
||||||
|
|
||||||
|
|
||||||
class OrganizationAdmin(admin.ModelAdmin):
|
|
||||||
search_fields = ['organisation_search', 'org_alpjha_search', 'organization_2', 'organization_3', 'subject']
|
|
||||||
|
|
||||||
|
|
||||||
class RangeOnlineInfoAdmin(admin.ModelAdmin):
|
class RangeOnlineInfoAdmin(admin.ModelAdmin):
|
||||||
search_fields = ['info_source']
|
search_fields = ['info_source']
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue