{% load form_helper %}
{% for field in form.visible_fields %}
  {% render_field field %}
{% endfor %}
{% for field in form.hidden_fields %}{{ field }}{% endfor %}

{% load form_helper %}
{% if form.non_field_errors %}
  <div class="alert alert-danger">
  {% for error in form.non_field_errors %}
    <p>
      {{ error }}
    </p>
  {% endfor %}
</div>
{% endif %}
{% for field in form.visible_fields %}
  {% render_field field %}
{% endfor %}
{% for field in form.hidden_fields %}{{ field }}{% endfor %}

Add non-field errors to bootstrap error form
Add non-field errors to bootstrap error form