{% macro message_category_class(category) %} {% if category == 'error' %} alert-danger {% elif category == 'warning' %} alert-warning {% elif category == 'success' %} alert-info {% endif %} {% endmacro %} {% with messages = get_flashed_messages(with_categories=True) %} {% if messages %}