{% comment %} Django Ninja's Swagger page, plus the two things its version selector needs: the standalone preset script, and StandaloneLayout to render the topbar that reads `urls`. See infrastructure/common/docs.py for why this template exists at all. {% endcomment %} {{ api.title }} {% if redoc_url %}

Reading rather than calling? Open the same schema in ReDoc.

{% endif %} {% comment %} Rendered from what Django already knows about the reader, so the page is truthful on first paint rather than after a round trip -- and so the two cases that can only end in a refusal (nobody signed in, signed in but not staff) never issue the request at all. {% endcomment %}

Not signed in to the admin, so Authorize is yours to fill in.{% if admin_login_url %} Sign in to the admin and this page will authorise itself.{% endif %} {% elif not session_is_staff %}data-state="denied">Signed in as {{ session_username }}, which is not a staff account -- Authorize is yours to fill in. {% else %}data-state="pending">Signed in as {{ session_username }} -- asking for a token for this session...{% endif %}