mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-16 17:47:02 +02:00
model updates
This commit is contained in:
parent
1e98ba38b9
commit
c9c6890e7d
4 changed files with 35 additions and 67 deletions
|
@ -2464,6 +2464,23 @@ class VerifiedByStaffAdmin(ListHeaderAdmin):
|
|||
super().save_model(request, obj, form, change)
|
||||
|
||||
|
||||
class PortfolioAdmin(ListHeaderAdmin):
|
||||
# list_display = ("email", "requestor", "truncated_notes", "created_at")
|
||||
# search_fields = ["email"]
|
||||
# search_help_text = "Search by email."
|
||||
# readonly_fields = [
|
||||
# "requestor",
|
||||
# ]
|
||||
|
||||
# change_form_template = "django/admin/email_clipboard_change_form.html"
|
||||
|
||||
def save_model(self, request, obj, form, change):
|
||||
# Set the creator field to the current admin user
|
||||
obj.creator = request.user if request.user.is_authenticated else None
|
||||
super().save_model(request, obj, form, change)
|
||||
|
||||
|
||||
|
||||
class FederalAgencyAdmin(ListHeaderAdmin):
|
||||
list_display = ["agency"]
|
||||
search_fields = ["agency"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue