{% for level, message in flash.all() %}
<div class="flash {{ level }}" role="alert">
{{ message }}
</div>
{% endfor %}