diff --git a/src/registrar/admin.py b/src/registrar/admin.py index def7c64b1..b06f50cbb 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -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")