<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}">
{# <div class="alert alert-info debug">
    Visible fields for {{ form._meta.model }}:
    {% for field in form.visible_fields() -%}
        <span class="badge preformatted">{{ field.name }}</span>
    {% endfor -%}
</div>
<div class="alert alert-info debug">
    Invisible fields for {{ form._meta.model }}:
    {% for field in form.hidden_fields() -%}
        <span class="badge preformatted">{{ field.name }}</span>
    {% endfor -%}
</div> -#}
{% if form.non_field_errors() -%}
<div class="alert alert-danger">
    <a class="close"><button is="dismiss-alert"></button></a>
    {% for non_field_error in form.non_field_errors() -%}
        {{ non_field_error }}
    {% endfor -%}
</div>
{% endif -%}
{% for field in form.hidden_fields() -%}
    {{ field|safe }}
{% endfor -%}
{% for field in form.visible_fields() -%}
    {{ field.djk_renderer() }}
{% endfor -%}
