{% if messages %}
<div class="row messages">
  {% for message in messages %}
    <div class="col-sm-12 item">
      <div class="alert alert-{{ message.level_tag }} alert-dismissible fade in{% if message.tags %} {{ message.tags }}{% endif %}">
        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span></button>
        {% if 'safe' in message.tags %}
          {{ message|safe }}
        {% else %}
          {{ message }}
        {% endif %}
      </div>
    </div>
  {% endfor %}
</div>
{% endif %}
