Django Dynamic Theme
This allows an administrator of a django website to change the theme on the fly.
Installation
pip install django-dynamic-theme
Quickstart
- Add the following settings::
INSTALLED_APPS = [
...,
"django_dynamic_theme",
"compressor",
]
...
# Default setting but you can set it to some other path.
STATIC_URL = "static/"
STATIC_ROOT = "static"
STATICFILES_FINDERS = [
...,
"compressor.finders.CompressorFinder",
]
COMPRESS_PRECOMPILERS = (("text/x-scss", "django_libsass.SassCompiler"),)
MIDDLEWARE = [
...,
"django_dynamic_theme.middleware.MissingThemeHandleMiddleware",
]
TEMPLATES = {
"OPTIONS": {
"context_processors": [
...,
"django_dynamic_theme-context_processor.theme",
]
}
}
-
Run
python manage.py migrate -
Assuming you have
base.htmladd this to it before the<body>tag:
<html>
...
{% load compress %}
{% load static %}
{% compress css %}
<link type="text/x-scss" rel="stylesheet" href="{% static theme_file %}" />
...
</html>
- Visit
http://127.0.0.1:8000/admin/django_dynamic_theme/to start customizing your theme.
Metadata
Release files for django-dynamic-theme 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_dynamic_theme-0.0.10.tar.gz | 9.9 kB | Without provenance | Details for django_dynamic_theme-0.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_dynamic_theme-0.0.10-py3-none-any.whl | Python 3 | none | any | Details for django_dynamic_theme-0.0.10-py3-none-any.whl |
Total release size: 29.5 kB
Release files / django_dynamic_theme-0.0.10.tar.gz
| Download URL | django_dynamic_theme-0.0.10.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd6bdf854ab9877af6764290252b3a5c01400366140ec68c61c7b8a9dd7da78b
|
|
BLAKE2b-256 checksum How to use checksums |
c9f7ac64a719efd1790927749073bba79ceddc6d14f81d14cb77fd48ff2d8251
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / django_dynamic_theme-0.0.10-py3-none-any.whl
| Download URL | django_dynamic_theme-0.0.10-py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30e1cddf66b53f098e4e2c2cae9e3b23d35c0a6929b2bd863ad5029595aff161
|
|
BLAKE2b-256 checksum How to use checksums |
003331680272ea5496687ad08350e1e1c8bba73fce5aafa4c749cb46eadae0b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for django-dynamic-theme 0.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.