diff --git a/ordr2/templates/macros.jinja2 b/ordr2/templates/macros.jinja2 new file mode 100644 index 0000000..05ee087 --- /dev/null +++ b/ordr2/templates/macros.jinja2 @@ -0,0 +1,14 @@ +{% macro flash_messages() -%} + {% for queue in ('ok', 'warning', 'error') %} + {% for message in request.session.pop_flash(queue) %} + {% set css_class = 'danger' if queue == 'error' else queue %} +