diff --git a/src/registrar/admin.py b/src/registrar/admin.py index b06111e5b..21850364e 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -69,6 +69,7 @@ class DomainInformationInlineForm(forms.ModelForm): widgets = { "other_contacts": NoAutocompleteFilteredSelectMultiple("other_contacts", False), } + template = "django/admin/domain_information_change_form.html" class DomainRequestAdminForm(forms.ModelForm): @@ -1440,8 +1441,8 @@ class DomainInformationInline(admin.StackedInline): from DomainInformationAdmin""" form = DomainInformationInlineForm - model = models.DomainInformation + template = "django/admin/domain_information_inline_change_form.html" fieldsets = copy.deepcopy(DomainInformationAdmin.fieldsets) # remove .gov domain from fieldset diff --git a/src/registrar/templates/admin/stacked.html b/src/registrar/templates/admin/stacked.html new file mode 100644 index 000000000..8eac01864 --- /dev/null +++ b/src/registrar/templates/admin/stacked.html @@ -0,0 +1,51 @@ +{% load i18n admin_urls %} +{% load i18n static %} + +{% comment %} +This is copied from Djangos implementation of this template, with added "blocks" +It is not inherently customizable on its own, so we can modify this instead. +https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/edit_inline/stacked.html +{% endcomment %} + +