mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 20:18:38 +02:00
Test sorting
This commit is contained in:
parent
5e49772ef7
commit
e14ebdc2f5
1 changed files with 9 additions and 1 deletions
|
@ -549,7 +549,7 @@ class DomainApplicationAdmin(ListHeaderAdmin):
|
||||||
|
|
||||||
# Columns
|
# Columns
|
||||||
list_display = [
|
list_display = [
|
||||||
"requested_domain",
|
"get_requested_domain",
|
||||||
"status",
|
"status",
|
||||||
"organization_type",
|
"organization_type",
|
||||||
"created_at",
|
"created_at",
|
||||||
|
@ -557,6 +557,14 @@ class DomainApplicationAdmin(ListHeaderAdmin):
|
||||||
"investigator",
|
"investigator",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def get_requested_domain(self, obj):
|
||||||
|
return obj.requested_domain
|
||||||
|
get_requested_domain.admin_order_field = 'requested_domain__name' # Allows column order sorting
|
||||||
|
get_requested_domain.short_description = 'Requested Domain' # Sets column's header
|
||||||
|
|
||||||
|
|
||||||
|
ordering = ['requested_domain__name']
|
||||||
|
|
||||||
# Filters
|
# Filters
|
||||||
list_filter = ("status", "organization_type", "investigator")
|
list_filter = ("status", "organization_type", "investigator")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue