{# this is essentially admin/includes/fieldset.html, with detection of hidden fields. #} {# context structure: InlineFieldset -> Fieldline -> AdminField -> form field (BoundField instance) #} {# render all hidden fields top level, compacter and easier to debug - and allows CSS like .form-row:last-child #} {% for line in fieldset %}{% for adminfield in line %}{% if adminfield.field.is_hidden %} {{ adminfield.field }} {% endif %}{% endfor %}{% endfor %}