Merge pull request #643 from justmobilize/fix-collapse-in-django-5-1

This commit is contained in:
Rémy HUBSCHER 2025-10-21 10:00:20 +02:00 committed by GitHub
commit 889090ca7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,10 +49,21 @@
{% if fieldsets %}
{% for fieldset in fieldsets %}
<fieldset class="module{% if fieldset.collapse %} collapse{% endif %}">
{% if django_version < "5.1" %}
<h2>{{ fieldset.title }}</h2>
{% with config_values=fieldset.config_values %}
{% include "admin/constance/includes/results_list.html" %}
{% endwith %}
{% else %}
<details>
<summary>
<h2 class="fieldset-heading">{{ fieldset.title }}</h2>
</summary>
{% with config_values=fieldset.config_values %}
{% include "admin/constance/includes/results_list.html" %}
{% endwith %}
</details>
{% endif %}
</fieldset>
{% endfor %}
{% else %}