{% block extrajs %}
<script type="text/javascript" src="{{ STATIC_URL }}bootstrap/js/bootstrap-alert.js"></script>
{% endblock extrajs %}

<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>