diff --git a/src/unfold/admin.py b/src/unfold/admin.py index d83e9321..fe438739 100644 --- a/src/unfold/admin.py +++ b/src/unfold/admin.py @@ -235,6 +235,8 @@ class ModelAdmin(ModelAdminMixin, BaseModelAdmin): list_filter_submit = False list_fullwidth = False list_disable_select_all = False + list_before_template = None + list_after_template = None change_form_before_template = None change_form_after_template = None compressed_fields = False diff --git a/src/unfold/templates/admin/change_list.html b/src/unfold/templates/admin/change_list.html index 4a7252a1..5c6c4bfd 100644 --- a/src/unfold/templates/admin/change_list.html +++ b/src/unfold/templates/admin/change_list.html @@ -69,6 +69,10 @@ {% endif %} {% endblock %} + {% if cl.model_admin.list_before_template %} + {% include cl.model_admin.list_before_template %} + {% endif %} +
{% csrf_token %} @@ -109,6 +113,10 @@ {% endblock %}
+ {% if cl.model_admin.list_after_template %} + {% include cl.model_admin.list_after_template %} + {% endif %} + {% if cl.has_filters %} {% include "unfold/change_list_filter.html" %} {% endif %}