{% macro messages() %} {% with messages = get_flashed_messages(with_categories=True) %} {% if messages %} {% for category, m in messages %} {% if category %}
{% else %}
{% endif %} x {{ m }}
{% endfor %} {% endif %} {% endwith %} {% endmacro %}