diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 28 | ||||
| -rw-r--r-- | docs/releases/3.2.txt | 2 | ||||
| -rw-r--r-- | docs/spelling_wordlist | 1 |
3 files changed, 31 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 29af4cbcba..87d1b4f3f5 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -2802,6 +2802,34 @@ creating your own ``AdminSite`` instance (see below), and changing the :attr:`AdminSite.index_template` , :attr:`AdminSite.login_template` or :attr:`AdminSite.logout_template` properties. +.. _admin-theming: + +Theming support +=============== + +The admin uses CSS variables to define colors. This allows changing colors +without having to override many individual CSS rules. For example, if you +preferred purple instead of blue you could add a ``admin/base.html`` template +override to your project: + +.. code-block:: html+django + + {% extends 'admin/base.html' %} + + {% block extrahead %}{{ block.super }} + <style> + :root { + --primary: #9774d5; + --secondary: #785cab; + --link-fg: #7c449b; + --link-selected-fg: #8f5bb2; + } + </style> + {% endblock %} + +An up-to-date list of CSS variables is at +:file:`django/contrib/admin/static/admin/css/base.css`. + ``AdminSite`` objects ===================== diff --git a/docs/releases/3.2.txt b/docs/releases/3.2.txt index 71c5ec09ef..6850774312 100644 --- a/docs/releases/3.2.txt +++ b/docs/releases/3.2.txt @@ -117,6 +117,8 @@ Minor features * Read-only related fields are now rendered as navigable links if target models are registered in the admin. +* The admin now supports theming. See :ref:`admin-theming` for more details. + :mod:`django.contrib.admindocs` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/spelling_wordlist b/docs/spelling_wordlist index 74a1c30c0c..4ccf34ca4d 100644 --- a/docs/spelling_wordlist +++ b/docs/spelling_wordlist @@ -676,6 +676,7 @@ textarea th that'll Thejaswi +theming This'll threadlocals threadpool |
