{% load i18n nested_admin %} {% load admin_urlname admin_urlquote from admin_urls %} {# #} {# {% spaceless %} #} {# {% for fieldset in inline_admin_form %} #} {# {% for line in fieldset %} #} {# {% for field in line %} #} {# {% if field.field.is_hidden %} {{ field.field }} {% endif %} #} {# {% endfor %} #} {# {% endfor %} #} {# {% endfor %} #} {# {% endspaceless %} #} {# #} {% for fieldset in inline_admin_form %} {% for line in fieldset %} {% for field in line %} {% if not field.field.is_hidden %} {% if field.is_readonly %}
{{ field.contents }}
{% else %} {{ field.field }} {{ field.field.errors.as_ul }} {% endif %} {% if field.field.help_text %}

{{ field.field.help_text }}

{% endif %} {# Super hacky! Put all hidden fields inside the first cell, so that grappelli's #} {# :first-child styles come through #} {# {% if forloop.first and forloop.parentloop.first and forloop.parentloop.parentloop.first %} #} {# {% spaceless %} #} {# {% for fieldset_for_hidden in inline_admin_form %} #} {# {% for line_for_hidden in fieldset_for_hidden %} #} {# {% for field_for_hidden in line_for_hidden %} #} {# {% if field_for_hidden.field.is_hidden %} {{ field_for_hidden.field }} {% endif %} #} {# {% endfor %} #} {# {% endfor %} #} {# {% endfor %} #} {# {% endspaceless %} #} {# {% endif %} #} {% endif %} {% endfor %} {% endfor %} {% endfor %} {% spaceless %} {% for fieldset in inline_admin_form %} {% for line in fieldset %} {% for field in line %} {% if field.field.is_hidden %} {{ field.field }} {% endif %} {% endfor %} {% endfor %} {% endfor %} {% endspaceless %} {% if inline_admin_form.has_auto_field or inline_admin_form.needs_explicit_pk_field %} {{ inline_admin_form.pk_field.field }} {% endif %} {% if inline_admin_form.fk_field %}{{ inline_admin_form.fk_field.field }}{% endif %}