{% load djadmin_form djadmin_inline_form %}
{% part form %}
    {% if form.non_field_errors%}
    <div>
        {% for error in form.non_field_errors %}
        <small class="error">{{ error }}</small>
        {% endfor %}
    </div>
    {% endif %}
    {% part form hidden %}{% for hidden in form.hidden_fields %}
            {{ hidden }}
    {% endfor %}{% endpart %}
    {% if layout %}{% part form visible %}
            {% render layout %}{% endrender %}
    {% endpart %}{% else %}
        {% part form visible %}
            {% for bound_field in form.visible_fields %}{% render bound_field %}{% endrender %} {% endfor %}
        {% endpart %}{% part 'inlines' %}
            {% for inline in inlines %}
                {{ inline }}
            {% endfor %}
        {% endpart %}
    {% endif %}
{% endpart %}
