{% load helpers %}
{# Django Messages #} {# Form Field Errors #} {% if form and form.errors %} {% for field in form %} {% for error in field.errors %} {% endfor %} {% endfor %} {% endif %} {# Non-Field Form Errors #} {% if form and form.non_field_errors %} {% for error in form.non_field_errors.get_json_data %} {% endfor %} {% endif %} {# Django Messages #} {% if messages %} {% for message in messages %} {% with message.level_tag|status_from_tag as status %} {% with status|icon_from_status as icon %} {% endwith %} {% endwith %} {% endfor %} {% endif %}