{# 404 Not Found page for Duck Framework. #} {# Extends base.html. Adds a debug-only route registry panel when DEBUG=True. Extra context variables (on top of base.html): routes (list[dict]) — [{pattern, name, methods}] from RouteRegistry use_django (bool) — True when USE_DJANGO=1 is active #} {% extends "base.html" %} {% block main %} {# Status eyebrow pill #} 404  ·  Not Found {# Primary heading #}

Page Not Found

{# Explanation — adjusted copy when debug routes are visible #}

{% if debug and routes %} No route matched the requested path. Browse the registry below to find the right one. {% else %} The page you're looking for doesn't exist or has been moved. {% endif %}

{# Request metadata row #} {% if request is defined and request %}
{{ request.method }} {{ request.path }} {% if request.http_version is defined and request.http_version %} · {% if request.request_store.get("h2_handling") %} HTTP/2 {% else %} {{ request.http_version }} {% endif %} {% endif %}
{% endif %} {# Debug-only section #} {% if debug %} {# Django side-URL hint #} {% if use_django %}
USE_DJANGO=True is active — this URL may be registered in Django only. Add it to DJANGO_SIDE_URLS if that is the case.
{% endif %} {# Route registry panel #} {% if routes %}
{# Panel header — label and total count #}
Registered Routes {{ routes | length }}
{# Two-column card grid #}
{% for route in routes %}
{# Method badges — only rendered when methods are declared #} {% if route.get('methods') %}
{% for method in route.get('methods', []) %} {{ method }} {% endfor %}
{% endif %} {# URL pattern — segments highlighted via JS #} {{ route.pattern }} {# Route name — muted label at bottom of card #} {{ route.name }}
{% endfor %}
{% else %}
No routes are currently registered in RouteRegistry.
{% endif %} {% endif %} {# Debug mode notice — only when DEBUG=True #} {% if debug %}
You are seeing this page because DEBUG=True is set. Switch to DEBUG=False to show the standard response.
{% endif %} {# Navigation actions #} {% endblock main %} {% block extra %} {% endblock extra %}