{% if messages %}
  <div class="container" style="margin-top: 1rem">
    {% for message in messages %}
      <div class="alert alert-{% if message.tags %}{{ message.tags }}{% endif %} fade show"
           role="alert">
        {{ message|safe }}
      </div>
    {% endfor %}
  </div>
{% endif %}