From 61ec123b20522fe7ebf277a984aa8d1a51f08df3 Mon Sep 17 00:00:00 2001 From: Gagan Deep Date: Tue, 12 Aug 2025 17:40:49 +0530 Subject: [PATCH] fix: correct field help text layout on Django 5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After commit 7537fcb556fa473d68d054df735109909311dcb1, field help text in Django 5.2 were rendered inside the flexbox container, causing it to appear on the same line as the field. This broke Django’s default layout convention, where help text is displayed below the field. This patch moves the help text outside the flexbox container, restoring the expected layout. --- nested_admin/templates/nesting/admin/includes/inline.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nested_admin/templates/nesting/admin/includes/inline.html b/nested_admin/templates/nesting/admin/includes/inline.html index 60c20c8..6d2ae86 100644 --- a/nested_admin/templates/nesting/admin/includes/inline.html +++ b/nested_admin/templates/nesting/admin/includes/inline.html @@ -27,6 +27,7 @@ {{ field.field }} {% endif %} {% endif %} + {% if "5.0"|django_version_gte %}{% endif %} {% if field.field.help_text %}
{% if "5.0"|django_version_lt %} @@ -36,7 +37,6 @@ {% endif %}
{% endif %} - {% if "5.0"|django_version_gte %}{% endif %} {% endfor %} {% if "5.0"|django_version_gte and not line.fields|length == 1 %}{% endif %}