From 161446631951de14ff23161b56460257ac053b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Jerosimi=C4=87?= Date: Mon, 10 Nov 2025 11:01:24 +0100 Subject: [PATCH] Fix collapse setting for Django 5.1+ #647 --- .../templates/admin/constance/change_list.html | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/constance/templates/admin/constance/change_list.html b/constance/templates/admin/constance/change_list.html index 4fc96bc..72b834a 100644 --- a/constance/templates/admin/constance/change_list.html +++ b/constance/templates/admin/constance/change_list.html @@ -49,21 +49,13 @@ {% if fieldsets %} {% for fieldset in fieldsets %}
- {% if django_version < "5.1" %} -

{{ fieldset.title }}

+ {% if django_version >= "5.1" and fieldset.collapse %}
{% endif %} +

{{ fieldset.title }}

+ {% if django_version >= "5.1" and fieldset.collapse %}
{% endif %} {% with config_values=fieldset.config_values %} {% include "admin/constance/includes/results_list.html" %} {% endwith %} - {% else %} -
- -

{{ fieldset.title }}

-
- {% with config_values=fieldset.config_values %} - {% include "admin/constance/includes/results_list.html" %} - {% endwith %} -
- {% endif %} + {% if django_version >= "5.1" and fieldset.collapse %}
{% endif %}
{% endfor %} {% else %}