Merge pull request #1982 from cisagov/rjm/1952-sort-by-submission-date

Issue #1952: Change sort settings on domain requests admin (rjm)
This commit is contained in:
Rachid Mrad 2024-04-08 17:10:53 -04:00 committed by GitHub
commit 1af08e1770
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 75 additions and 7 deletions

View file

@ -1071,6 +1071,7 @@ class DomainRequestAdmin(ListHeaderAdmin):
# Columns
list_display = [
"requested_domain",
"submission_date",
"status",
"generic_org_type",
"federal_type",
@ -1079,7 +1080,6 @@ class DomainRequestAdmin(ListHeaderAdmin):
"custom_election_board",
"city",
"state_territory",
"submission_date",
"submitter",
"investigator",
]
@ -1207,7 +1207,9 @@ class DomainRequestAdmin(ListHeaderAdmin):
filter_horizontal = ("current_websites", "alternative_domains", "other_contacts")
# Table ordering
ordering = ["requested_domain__name"]
# NOTE: This impacts the select2 dropdowns (combobox)
# Currentl, there's only one for requests on DomainInfo
ordering = ["-submission_date", "requested_domain__name"]
change_form_template = "django/admin/domain_request_change_form.html"