diff --git a/nested_admin/templates/nesting/admin/includes/inline.html b/nested_admin/templates/nesting/admin/includes/inline.html index e454a96..604f7a1 100644 --- a/nested_admin/templates/nesting/admin/includes/inline.html +++ b/nested_admin/templates/nesting/admin/includes/inline.html @@ -1,3 +1,4 @@ +{% load nested_admin %}
{% if fieldset.name %}

{{ fieldset.name }}

{% endif %} {% if fieldset.description %} @@ -5,10 +6,14 @@ {% endif %} {% for line in fieldset %}
- {% if line.fields|length == 1 %}{{ line.errors }}{% endif %} + {% if line.fields|length == 1 %}{{ line.errors }}{% elif "4.2"|django_version_gte %}
{% endif %} {% for field in line %} -
- {% if not line.fields|length == 1 and not field.is_readonly %}{{ field.errors }}{% endif %} + {% if "4.2"|django_version_gte %} +
+ {% if not line.fields|length == 1 and not field.is_readonly %}{{ field.errors }}{% endif %} + {% endif %} +
+ {% if "4.2"|django_version_lt %}{% if not line.fields|length == 1 and not field.is_readonly %}{{ field.errors }}{% endif %}{% endif %} {% if field.is_checkbox %} {{ field.field }}{{ field.label_tag }} {% else %} @@ -19,13 +24,15 @@ {{ field.field }} {% endif %} {% endif %} - {% if field.field.help_text %} -
- {{ field.field.help_text|safe }} -
- {% endif %}
+ {% if field.field.help_text %} +
+ {{ field.field.help_text|safe }} +
+ {% endif %} + {% if "4.2"|django_version_gte %}
{% endif %} {% endfor %} + {% if "4.2"|django_version_gte %}{% if not line.fields|length == 1 %}
{% endif %}{% endif %}
{% endfor %}