{% import "macros.html" as macros with context %} {% block head %} {% block title %}{{ site_name }}{{ (': ' ~ title)|safe if title }}{% endblock %} {% endblock head %} {% block body %}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% if category == 'message' %}{% set alert_class = 'alert-success' %} {% elif category == 'warning' %}{% set alert_class = 'alert-warning' %} {% elif category == 'error' %}{% set alert_class = 'alert-danger' %} {% else %} {# catches 'info', the final recommended flash category #} {% set alert_class = 'alert-info' %} {% endif %}
{{ message }}
{% endfor %} {% endif %} {% endwith %} {% block content %}

Placeholder content here

{% endblock content %}
{% block stats %} {% endblock stats %} {% endblock body %} {% block scripts %} {% if config.DEBUG %} {% else %} {% endif %} {% endblock scripts %}