A Django app to provide dark mode static files for the Django Admin.
Project description
django-dark
Preamble
This is just a fresh playground, stay tuned or feel free to contribute.
Setup
pip install django-dark
Integration
- Add "dark" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [
...
'dark',
]
- a) Modify Django's base_site.html
<link href="/static/admin/css/dark.css" type="text/css" media="(prefers-color-scheme: dark)" rel="stylesheet">
- b) Include base_site.html override Template here?
Current Result
Developer Notes
vv
sv
pip install -r requirements/common.txt
lesscpy -x dark/less/dark.less dark/static/admin/css/dark.css
watchmedo shell-command --wait --patterns="*.less" --recursive --command "lesscpy -V -x dark/less/dark.less dark/static/admin/css/dark.css"
watchmedo shell-command --wait --patterns="*.less" --recursive --command "lesscpy -V -x dark/less/dark.less dark/static/admin/css/dark.css && python manage.py collectstatic --noinput"
python setup.py sdist
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-dark-0.1.4.tar.gz
(4.3 kB
view hashes)