{% block form_head %} {% if not no_head %} {% csrf_token %} {% if next %} {% endif %} {{ form.media }} {% endif %} {% endblock %} {% block form_body %} {{ form.non_field_errors }} {# Hack to allow recursive template inclusion #} {% with fieldset_template_name="partials/fieldset_as_div.html" field_template_name="partials/field_as_div.html" %} {% for thing in form %} {% include fieldset_template_name with fieldset=thing %} {% endfor %} {% endwith %} {% endblock %}