{% load i18n %} {% comment %} One layout fieldset (`item`). With a save button, it is wrapped with the button in a container the JS replaces after saving; keep its id, the data-fieldset-save-url attribute and the data-fieldset-save button. {% endcomment %} {% with fieldset=item.fieldset %} {% if item.save_url %}
{% block non_field_errors %} {% if non_field_errors %}
{{ non_field_errors }}
{% endif %} {% endblock non_field_errors %} {% block fieldset %} {% include "admin/includes/fieldset.html" with heading_level=2 prefix="fieldset" id_prefix=0 id_suffix=item.index %} {% endblock fieldset %} {% block save_bar %}
{{ message }}
{% endblock save_bar %}
{% else %} {% include "admin/includes/fieldset.html" with heading_level=2 prefix="fieldset" id_prefix=0 id_suffix=item.index %} {% endif %} {% endwith %}