{% extends 'admin/base.html' %}
{% comment %}
The admin's front page, replaced. Django's is a list of models, which answers
"what exists" and never "what needs doing" -- so an editor lands on a menu and
has to go looking for the page they were asked to change.
**This template knows no app.** It used to carry a hard-coded block per feature
-- content here, shop there, sign-ins below -- which meant that installing an app
was only two thirds of installing it: the third part was remembering to edit this
file, and an app that nobody remembered shipped with numbers nothing displayed.
So it draws whatever `infrastructure.common.adminui.dashboard` hands it. Each
app publishes its own section from its own `adminui.py`, checks its own
permissions there, and is absent -- heading and all -- when it is not installed
or has nothing to tell this particular reader. Adding a section to this page is
a function in the app that owns the numbers, and nothing here.
A section is a title, some cards (a number, a line about it, somewhere to go),
and some panels (figures, bars, a short list, or any combination). That
vocabulary is deliberately small: a dashboard whose every block is bespoke is a
dashboard nobody can add to without a design conversation.
{% endcomment %}
{% load i18n unfold %}
{% block title %}{% if subtitle %}{{ subtitle }} | {% endif %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}
{% block branding %}
{% include "unfold/helpers/site_branding.html" %}
{% endblock %}
{% block content %}
{% for section in admin_sections %}
{{ section.title }}
{% if section.cards %}
{{ card.value }}
{{ card.hint }}
{% endcomponent %}
{% endfor %}
{{ figure.value }}