feature request: admin dark theme as an option in settings.py

201 views
Skip to first unread message

Michael Fischer

unread,
Feb 18, 2022, 2:33:58 PM2/18/22
to Django developers (Contributions to Django itself)
Hi! We recently updated to Django==3.2.12 and were very please to find that dark theme is now supported in the admin.  But, it seems this is only if the user's desktop settings are set to dark theme.  It would be really great if this could be application-specific, so that the admin page always displays in the given theme regardless of local settings.  Is it possible to have this added as an option in settings.py?

Thanks for the great work you all do!

Carlton Gibson

unread,
Mar 2, 2022, 9:04:27 AM3/2/22
to Django developers (Contributions to Django itself)
Hi Michael. 

The easiest thing to do here is override the CSS file at: django/contrib/admin/static/admin/css/dark_mode.css

So, most often, put a `admin/css/dark_mode.css` in a project level folder defined by `STATICFILES_DIRS`.

Kind Regards,

Carlton

On Fri, 18 Feb 2022 at 20:33, Michael Fischer <michael...@marinelabs.io> wrote:
Hi! We recently updated to Django==3.2.12 and were very please to find that dark theme is now supported in the admin.  But, it seems this is only if the user's desktop settings are set to dark theme.  It would be really great if this could be application-specific, so that the admin page always displays in the given theme regardless of local settings.  Is it possible to have this added as an option in settings.py?

Thanks for the great work you all do!

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/84a8212a-680b-4843-b0d4-e369cc04a3a6n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages