{% if messages %}
<div id="alerts">
    {% for message in messages %}
        <div class="alert {% if message.tags %}alert-{{ message.tags }}{% endif %}">
            <a class="close" data-dismiss="alert" href="#">x</a>
            {{ message }}
        </div>
    {% endfor %}
</div>
{% endif %}
