{% load static %} {% comment %} Dark mode no-flash (#84): paint the `.dark` class on server-side from the `dar-theme` cookie (see views._resolve_initial_theme) so the correct theme is on the page before first paint — no light→dark flash, and no inline script (keeps a strict `script-src 'self'` CSP intact). {% endcomment %} {% comment %} Absolute URL prefix the SPA calls for every JSON request (#559). Defaults to `/api/v1/` (the inline include behaviour); a consumer can override via `DJANGO_ADMIN_REACT["API_URL_PREFIX"]` to point the SPA at a separately-mounted django-admin-rest-api. {% endcomment %} {% comment %} Legacy-admin escape hatch (#577): only emitted when the consumer set ``DJANGO_ADMIN_REACT["LEGACY_ADMIN_URL_PREFIX"]``. The SPA reads this meta and renders a thin top banner linking the same page under the legacy admin's prefix. Absent meta = no banner, no behavioural change. {% endcomment %} {% if legacy_admin_prefix %}{% endif %} {% if brand_logo_url %}{% endif %} {% comment %} The tab uses the AdminSite's site_title (Django's tab-title source); the sidebar header reads dar-brand-title (site_header). Both collapse to BRAND_TITLE when the consumer set that override (#281). {% endcomment %} <title>{{ tab_title }} {% if brand_logo_url %} {% else %} {% endif %} {% comment %} PWA (#86): the manifest + SW are served by the package at the mount (pwa.py); link the manifest + PWA meta so the browser offers "Install". The SW is registered from main.tsx. This is a block-tag comment on purpose: the inline hash form is single-line only, so a multi-line one would be rendered verbatim into the page head. {% endcomment %} {% comment %} Accent color (#437): the SPA reads --dar-primary for primary buttons, links, and active states, so a consumer can rebrand with no React rebuild. `primary_color` is validated server-side to a strict hex color (see views._resolve_primary_color) — it must not be able to inject CSS through this {% csrf_token %} {% if bundle %} {% for css_path in bundle.css %} {% endfor %} {% endif %}
{% if not bundle %}

django-admin-react

The React bundle is not built yet.

From the repo root, run:

pnpm install
pnpm run build:vite

Then refresh this page.

{% else %} {% endif %}