mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-24 19:48:36 +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
|
||||
list_display = [
|
||||
"requested_domain",
|
||||
"get_requested_domain",
|
||||
"status",
|
||||
"organization_type",
|
||||
"created_at",
|
||||
|
@ -557,6 +557,14 @@ class DomainApplicationAdmin(ListHeaderAdmin):
|
|||
"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
|
||||
list_filter = ("status", "organization_type", "investigator")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue