{% load i18n %}

{% if messages %}
  <ul class="messages">
    {% for message in messages %}
      <div
        class="alert alert-{% if message.tags == "error" %}danger{% else %}{{ message.tags }}{% endif %} alert-dismissible"
        role="alert">
        <button type="button" class="close" data-dismiss="alert"
                aria-label="{% trans "Close" %}"><span
          aria-hidden="true">&times;</span>
        </button>
        {{ message }}
      </div>
    {% endfor %}
  </ul>
{% endif %}
