mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 03:58:39 +02:00
updates to election office
This commit is contained in:
parent
4a3a72cfdd
commit
a23c095139
1 changed files with 11 additions and 4 deletions
|
@ -767,10 +767,10 @@ class DomainApplicationAdmin(ListHeaderAdmin):
|
||||||
"requested_domain",
|
"requested_domain",
|
||||||
"status",
|
"status",
|
||||||
"organization_type",
|
"organization_type",
|
||||||
"federal_agency",
|
|
||||||
"federal_type",
|
"federal_type",
|
||||||
|
"federal_agency",
|
||||||
"organization_name",
|
"organization_name",
|
||||||
"is_election_board",
|
"custom_election_board",
|
||||||
"city",
|
"city",
|
||||||
"state_territory",
|
"state_territory",
|
||||||
"created_at",
|
"created_at",
|
||||||
|
@ -784,6 +784,12 @@ class DomainApplicationAdmin(ListHeaderAdmin):
|
||||||
("investigator", ["first_name", "last_name"]),
|
("investigator", ["first_name", "last_name"]),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def custom_election_board(self, obj):
|
||||||
|
return obj.is_election_board
|
||||||
|
|
||||||
|
custom_election_board.admin_order_field = "is_election_board" # type: ignore
|
||||||
|
custom_election_board.short_description = "Election office" # type: ignore
|
||||||
|
|
||||||
# Filters
|
# Filters
|
||||||
list_filter = ("status", "organization_type", InvestigatorFilter)
|
list_filter = ("status", "organization_type", InvestigatorFilter)
|
||||||
|
|
||||||
|
@ -1044,8 +1050,8 @@ class DomainAdmin(ListHeaderAdmin):
|
||||||
list_display = [
|
list_display = [
|
||||||
"name",
|
"name",
|
||||||
"organization_type",
|
"organization_type",
|
||||||
"federal_agency",
|
|
||||||
"federal_type",
|
"federal_type",
|
||||||
|
"federal_agency",
|
||||||
"organization_name",
|
"organization_name",
|
||||||
"is_election_board",
|
"is_election_board",
|
||||||
"city",
|
"city",
|
||||||
|
@ -1089,9 +1095,10 @@ class DomainAdmin(ListHeaderAdmin):
|
||||||
organization_name.admin_order_field = "domain_info__organization_name" # type: ignore
|
organization_name.admin_order_field = "domain_info__organization_name" # type: ignore
|
||||||
|
|
||||||
def is_election_board(self, obj):
|
def is_election_board(self, obj):
|
||||||
return obj.domain_info.is_election_board if obj.domain_info else None
|
return obj.domain_info.is_election_board if obj.domain_info else False
|
||||||
|
|
||||||
is_election_board.admin_order_field = "domain_info__is_election_board" # type: ignore
|
is_election_board.admin_order_field = "domain_info__is_election_board" # type: ignore
|
||||||
|
is_election_board.short_description = "Election office" # type: ignore
|
||||||
|
|
||||||
def city(self, obj):
|
def city(self, obj):
|
||||||
return obj.domain_info.city if obj.domain_info else None
|
return obj.domain_info.city if obj.domain_info else None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue