{% for message in messages %}
<div class="alert fade in {% if message.tags %} alert-{{ message.tags }}{% endif %} alert-dismissable">
<button type="button" class="close" data-dismiss="alert">×</button>
{{ message }}
</div>
{% endfor %}