Merge pull request '10106/update-list-view' (#1) from 10106/update-list-view into master

Reviewed-on: #1
This commit is contained in:
pcoder116 2022-01-04 17:46:39 +00:00
commit 5d71cd8182
2 changed files with 13 additions and 6 deletions

View File

@ -1,9 +1,14 @@
# CHANGELOG.md # CHANGELOG.md
##Unreleased ## Unreleased
Bugfixes: Bugfixes:
- issue#10077: efficient input lookup for organization column in Person - issue#10106
- Organisation : add country to the list at the end
- Mountain Ranges: add country at the end. sort the range names in alphabetical order.
- Persons: should have organisation name in the list view
- Resources: Alphabetically sort the titles
- issue#10077: efficient input lookup for organization column in Person
## 1.8 (2022-01-04) ## 1.8 (2022-01-04)
@ -83,4 +88,4 @@ Bugfixes:
Features: Features:
- First release includes functioning django admin interfaces for - First release includes functioning django admin interfaces for
`Person` and `Range` models `Person` and `Range` models

View File

@ -58,7 +58,7 @@ class PersonAdmin(admin.ModelAdmin):
), ),
}), }),
) )
list_display = ['id', 'full_name' ] list_display = ['id', 'full_name', 'organization']
autocomplete_fields = ['organization'] autocomplete_fields = ['organization']
# list_display_links = ['id'] # list_display_links = ['id']
@ -87,6 +87,7 @@ class ResourceAdmin(admin.ModelAdmin):
search_fields = ['title', 'url', 'citation', 'abstract'] search_fields = ['title', 'url', 'citation', 'abstract']
readonly_fields = ['id'] readonly_fields = ['id']
list_display = ['title', 'citation', 'type'] list_display = ['title', 'citation', 'type']
ordering = ['title']
fieldsets = ( fieldsets = (
(None, { (None, {
'fields': ( 'fields': (
@ -163,7 +164,8 @@ class RangeAdmin(admin.ModelAdmin):
'fields': ('comments',), 'fields': ('comments',),
}) })
) )
list_display = ['range_name', 'countries', 'mother_range'] list_display = ['range_name', 'mother_range', 'countries']
ordering = ['range_name']
class PeopleOrganizationInline(admin.TabularInline): class PeopleOrganizationInline(admin.TabularInline):
@ -178,7 +180,7 @@ class OrganizationAdmin(admin.ModelAdmin):
] ]
readonly_fields = ('org_num1',) readonly_fields = ('org_num1',)
search_fields = ['organisation_search', 'org_alpha_search', 'organisation_2', 'organisation_3', 'subject'] search_fields = ['organisation_search', 'org_alpha_search', 'organisation_2', 'organisation_3', 'subject']
list_display = ['organisation_english', 'organisation_2'] list_display = ['organisation_english', 'organisation_2', 'country']
fieldsets = ( fieldsets = (
(None, { (None, {
'fields': ( 'fields': (