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