{{ heading }}

{% if message %}

{{ message }}

{% endif %} {% if grouped %} {# Two-layer grouping: section -> subgroup -> items. Produced by DiagnosticCollector.grouped(). #} {% for sec in grouped %}

{{ sec.section }}

{% for sub in sec.subgroups %}

{{ sub.label }}

{% for item in sub.diagnostics %}
{{ item.message }}
{% if item.suggestion %}
{{ item.suggestion }}
{% endif %} {% if item.source %}
{{ item.source }}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %} {% elif details %} {# Flat fallback used by the 404 handler and other one-off pages that pass plain strings or a small list of items. #} {% for item in details %}
{% if item is string %}
{{ item }}
{% else %}
{{ item.message }}
{% if item.suggestion %}
{{ item.suggestion }}
{% endif %} {% endif %}
{% endfor %} {% endif %} {% if help_text %}
{# help_text is wrapped in markupsafe.Markup at construction; plain strings auto-escape correctly. #} {{ help_text }}
{% endif %} {% if continue_url %} Continue to study → {% endif %}