--
Ticket URL: <https://code.djangoproject.com/ticket/33182>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => RUDRANSH-hub
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/33182#comment:1>
* owner: RUDRANSH-hub => Matteo Vitali
Comment:
Appreciate the interest, but we have a patch prepared already by the
ticket author. We should evaluate that one first.
[https://github.com/django/django/pull/14929 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/33182#comment:2>
* cc: Paolo Melchiorre (added)
* keywords: admin dark schema => admin dark schema css ui ux
* version: 3.2 => dev
Comment:
Great addition Matteo. I think the correct target version is current dev
and the pathc nedd some improvements like release note additions.
--
Ticket URL: <https://code.djangoproject.com/ticket/33182#comment:3>
* needs_better_patch: 0 => 1
* stage: Unreviewed => Accepted
* needs_tests: 0 => 1
* needs_docs: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/33182#comment:4>
* cc: Carlton Gibson (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/33182#comment:5>
Comment (by Carlton Gibson):
So this is a follow-up to #31259 which added the dark theme after #32018
allowed theming via CSS vars.
[https://stackoverflow.com/questions/67135053/can-someone-explain-to-my-
why-my-django-admin-theme-is-dark This Stack Overflow thread captures the
issues people have].
* How to disable (whilst keeping `prefers-color-scheme` set to dark?🤔)
* Where/how exactly to override.
The PR moves the dark theme variable definitions into their own file, and
adds an AdminSite attribute for that.
Probably just a `block` is enough.
Then in [https://docs.djangoproject.com/en/3.2/ref/contrib/admin/#admin-
theming the Theming Support] docs:
* Link `template override` in the first paragraph to the
[https://docs.djangoproject.com/en/3.2/ref/contrib/admin/#overriding-
admin-templates Overriding Admin Templates] docs.
* Move the "A dark theme..." paragraph to a new subsection below "The list
of CSS variables..."]
* Then add the file the vars are defined in, and mention the block that
can be overridden to replace these, or skip the stylesheet entirely.
* Add a `versionchanged` for the variables being move to a separate
stylesheet.
That should cover it.
I'm not sure we have automated tests for this. Manual testing will have to
do.
--
Ticket URL: <https://code.djangoproject.com/ticket/33182#comment:6>
--
Ticket URL: <https://code.djangoproject.com/ticket/33182#comment:7>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
* needs_tests: 1 => 0
* needs_docs: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/33182#comment:8>
Comment (by Carlton Gibson <carlton.gibson@…>):
In [changeset:"a754b82dac511475b6276039471ccd17cc64aeb8" a754b82d]:
{{{
#!CommitTicketReference repository=""
revision="a754b82dac511475b6276039471ccd17cc64aeb8"
Refs #33182 -- Adjusted custom admin theming example to use correct
template block.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33182#comment:10>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"3f1f8b93760eee2f26eb84ddc4054f0c6b319da5" 3f1f8b93]:
{{{
#!CommitTicketReference repository=""
revision="3f1f8b93760eee2f26eb84ddc4054f0c6b319da5"
Fixed #33182 -- Moved admin dark mode vars to separate stylesheet and
template block.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33182#comment:9>
Comment (by Carlton Gibson <carlton.gibson@…>):
In [changeset:"afe090481f5ba04f1057cf598849f67d0bdf5d62" afe09048]:
{{{
#!CommitTicketReference repository=""
revision="afe090481f5ba04f1057cf598849f67d0bdf5d62"
[4.0.x] Refs #33182 -- Adjusted custom admin theming example to use
correct template block.
Backport of a754b82dac511475b6276039471ccd17cc64aeb8 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33182#comment:11>
Comment (by Carlton Gibson <carlton.gibson@…>):
In [changeset:"128179c0f8381b8fa0c9e630ce2e4a24665fb728" 128179c0]:
{{{
#!CommitTicketReference repository=""
revision="128179c0f8381b8fa0c9e630ce2e4a24665fb728"
[3.2.x] Refs #33182 -- Adjusted custom admin theming example to use
correct template block.
Backport of a754b82dac511475b6276039471ccd17cc64aeb8 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33182#comment:12>