File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,8 @@ class ModelAdmin(ModelAdminMixin, BaseModelAdmin):
235235 list_filter_submit = False
236236 list_fullwidth = False
237237 list_disable_select_all = False
238+ change_form_before_template = None
239+ change_form_after_template = None
238240 compressed_fields = False
239241 readonly_preprocess_fields = {}
240242 warn_unsaved_form = False
Original file line number Diff line number Diff line change 6464 < form {% if has_file_field %}enctype ="multipart/form-data " {% endif %}{% if form_url %}action ="{{ form_url }} " {% endif %}method ="post " id ="{{ opts.model_name }}_form " {% if adminform.model_admin.warn_unsaved_form %}class ="warn-unsaved-form "{% endif %} novalidate >
6565 {% csrf_token %}
6666
67+ {% if adminform.model_admin.change_form_before_template %}
68+ {% include adminform.model_admin.change_form_before_template %}
69+ {% endif %}
70+
6771 {% block form_top %}{% endblock %}
6872
6973 < div >
9498 {% for inline_admin_formset in inline_admin_formsets %}
9599 {% include inline_admin_formset.opts.template %}
96100 {% endfor %}
97-
98101 {% endblock %}
99102
100103 {% block after_related_objects %}{% endblock %}
101104
105+ {% if adminform.model_admin.change_form_after_template %}
106+ {% include adminform.model_admin.change_form_after_template %}
107+ {% endif %}
108+
102109 {% block submit_buttons_bottom %}{% submit_row %}{% endblock %}
103110
104111 {% block admin_change_form_document_ready %}
You can’t perform that action at this time.
0 commit comments