{% load crispy_forms_tags %}
{% if form %}
{% if form.errors %}

Warning: there was an error filling the form

{% for field in form %} {% for error in field.errors %}
{{ error|escape }}
{% endfor %} {% endfor %} {% for error in form.non_field_errors %}
{{ error|escape }}
{% endfor %} {% endif %}
{% crispy form %}
{% else %}
{% include ""|add:instance_li_template_name %}
{% endif %}