<div class="alert-area">
    {%- with messages = get_flashed_messages(with_categories=true) -%}
    {% if messages %}
    {% for category, message in messages %}
    <div class="alert alert-{{category}} alert-dismissable">
        {{ message}}
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
    </div>
    {% endfor %}
    {% endif %}
    {%- endwith %}
</div>
