{% load helpers %}

<div id="django-messages" class="toast-container position-fixed bottom-0 end-0 p-3" hx-swap-oob="true">

  {# Non-Field Form Errors #}
  {% if form and form.non_field_errors %}
    {% for error in form.non_field_errors.get_json_data %}
      {% include 'inc/toast.html' with status="danger" title="Error" message=error.message %}
    {% endfor %}
  {% endif %}

  {# Django Messages #}
  {% for message in messages %}
    {% include 'inc/toast.html' with status=message.level_tag|status_from_tag %}
  {% endfor %}

</div>
