-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2852: property to portfolio related fields - [AD] #3005
Changes from 54 commits
436809f
6599515
db0806b
32183a2
e69a296
5e8612b
271eb01
bfded58
00d0208
dec877b
015a08b
bac8d67
37ebe4e
eb2a5f6
a9aa8b1
5a896ac
69d33ee
72297b4
9b9e406
381423e
6e64f2c
4b45ccd
c977967
e93b35c
7ada2d1
52c2132
b5f705f
4d8e6b7
b9ec168
9c44346
0f4bd16
73f4d80
a3b5e2c
9349676
1a2d56e
9229e8c
9d48f4a
24164f3
0b0250b
30d7e56
f40ef08
b51251f
24dd5e7
a105568
f6bf437
a32ec35
4b1f3f3
29c20e8
ff7b4ac
a7ec0d5
c460e04
1ca5142
9a5ed14
45f8a85
3556309
6e788d1
a800715
5e9b9a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1700,20 +1700,44 @@ def queryset(self, request, queryset): | |
if self.value() == "0": | ||
return queryset.filter(Q(is_election_board=False) | Q(is_election_board=None)) | ||
|
||
@admin.display(description=_("Generic Org Type")) | ||
def converted_generic_org_type(self, obj): | ||
return obj.converted_generic_org_type | ||
|
||
@admin.display(description=_("Organization Name")) | ||
def converted_organization_name(self, obj): | ||
return obj.converted_organization_name | ||
|
||
@admin.display(description=_("Federal Agency")) | ||
def converted_federal_agency(self, obj): | ||
return obj.converted_federal_agency | ||
|
||
@admin.display(description=_("Federal Type")) | ||
def converted_federal_type(self, obj): | ||
return obj.converted_federal_type | ||
|
||
@admin.display(description=_("City")) | ||
def converted_city(self, obj): | ||
return obj.converted_city | ||
|
||
@admin.display(description=_("State/Territory")) | ||
def converted_state_territory(self, obj): | ||
return obj.converted_state_territory | ||
|
||
# Columns | ||
list_display = [ | ||
"requested_domain", | ||
"first_submitted_date", | ||
"last_submitted_date", | ||
"last_status_update", | ||
"status", | ||
"generic_org_type", | ||
"federal_type", | ||
"federal_agency", | ||
"organization_name", | ||
"custom_election_board", | ||
"city", | ||
"state_territory", | ||
"converted_generic_org_type", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be good to add @admin.display definitions (see other areas in admin.py that do this) so that the headers of these columns do not say "converted" in the title. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for pointing that out! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still don't see updates for the column headers. Did we decide against it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added them under filters. |
||
"converted_organization_name", | ||
"converted_federal_agency", | ||
"converted_federal_type", | ||
"converted_city", | ||
"converted_state_territory", | ||
"investigator", | ||
] | ||
|
||
|
@@ -1852,7 +1876,7 @@ def status_history(self, obj): | |
|
||
# Read only that we'll leverage for CISA Analysts | ||
analyst_readonly_fields = [ | ||
"federal_agency", | ||
"converted_federal_agency", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From my understanding, we are stripping out all the ACs involving change forms. Revert to federal_agency. |
||
"creator", | ||
"about_your_organization", | ||
"requested_domain", | ||
|
@@ -1869,15 +1893,16 @@ def status_history(self, obj): | |
"suborganization_city", | ||
"suborganization_state_territory", | ||
] | ||
|
||
autocomplete_fields = [ | ||
"approved_domain", | ||
"requested_domain", | ||
"creator", | ||
"senior_official", | ||
"investigator", | ||
"portfolio", | ||
"sub_organization", | ||
] | ||
|
||
filter_horizontal = ("current_websites", "alternative_domains", "other_contacts") | ||
|
||
# Table ordering | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CocoByte these are the admin.display methods.