{% extends 'base/utils.html' %} {% macro render_messages(messages=None, container=False, transform={ 'critical': 'danger', 'error': 'danger', 'info': 'info', 'warning': 'warning', 'debug': 'primary', 'notset': 'primary', 'message': 'primary', }, default_category=config.BOOTSTRAP_MSG_CATEGORY, dismissible=False, dismiss_animate=False) -%} {% with messages = messages or get_flashed_messages(with_categories=True) -%} {% if messages -%} {# don't output anything if there are no messages #} {% if container -%}
{% endif -%} {% for cat, msg in messages %} {%- endfor -%} {% if container %}
{% endif -%} {% endif -%} {% endwith -%} {% endmacro -%}