diff --git a/Changelog.md b/Changelog.md index 88ebf0c..64fd784 100644 --- a/Changelog.md +++ b/Changelog.md @@ -14,17 +14,18 @@ Bugfixes: > Elev low, Elev high, eleve range, eleve avg: does not show in access - Resources - 1. Search seems to work as it should on django admin for Resources app, so I could locate the following entry to compare 1:1 to access. + [x] 1. Search seems to work as it should on django admin for Resources app, so I could locate the following entry to compare 1:1 to access. Relative contribution of soil, management and traits to co-variations of multiple ecosystem properties in grasslands https://gmba-django-internal.ungleich.ch/admin/app/resource/1/change/?_changelist_filters=q%3Drelative%2Bcontribution [x] stars needs to be dropdown choice instead of text field - in Access, the URL link is clickable, in django it isn't: in django the url is wrapped in # - in Access, Type is dropdown choice - PEGASuS Check map with author needs to be checkbox - Gloria, Gnomo, LTER, LTSER, MIREN, TEAM, Inventory needs to be checkbox + [x] in Access, the URL link is clickable, in django it isn't: in django the url is wrapped in # + [x] in Access, Type is dropdown choice + [x] PEGASuS Check map with author needs to be checkbox + [x] Gloria, Gnomo, LTER, LTSER, MIREN, TEAM, Inventory needs to be checkbox 2. Ranges should have dropdown field, screenshot attached 3. Keywords should have dropdown field, screenshot attached 4. People should have Person/Role subcategory and dropdowns, screenshot attached + [x] 5. Fix the order of fields ## 1.1 (2021-11-26) diff --git a/app/admin.py b/app/admin.py index d28d672..7a6f76f 100644 --- a/app/admin.py +++ b/app/admin.py @@ -47,34 +47,22 @@ class PersonAdmin(admin.ModelAdmin): class ResourceAdmin(admin.ModelAdmin): search_fields = ['title', 'url', 'citation', 'abstract'] - readonly_fields = ['resource_url'] - # search_fields = ['organisation_search', 'org_alpha_search', 'organisation_2', 'organisation_3', 'subject'] - # list_display = ['organisation_english', 'country', 'city'] - # fieldsets = ( - # (None, { - # 'fields': ( - # ('org_num1', 'acronym', 'category', 'subject'), - # 'organisation_english', - # ('organisation_2', 'organisation_3'), - # 'organisation_original', - # ) - # }), - # ('Address', { - # 'classes': ('collapse',), - # 'fields': ( - # ('street', 'postcode', 'city'), - # ('po_box', 'country', 'lat_long'), - # ) - # }), - # ('Other details', { - # 'classes': ('collapse',), - # 'fields': (('tel', 'email'), - # 'url', - # 'org_url', - # 'tags', - # ), - # }) - # ) + readonly_fields = ['resource_url', 'id'] + list_display = ['title', 'country', 'city'] + fieldsets = ( + (None, { + 'fields': ( + ('id', 'stars'), + 'title', + 'citation', + ('type',), + ('url', 'resource_url'), + ('lat', 'lon'), + 'doi', + 'wiki_data_id', + ) + }) + ) def resource_url(self, instance): return format_html('{1}',