This enables the administrator of a django website to change the theme on the fly.
Project description
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"),)
TEMPLATES = {
"OPTIONS": {
"context_processors": [
...,
"django_dynamic_theme-context_processor.theme",
]
}
}
-
Run
python manage.py migrate
-
Assuming you have
base.html
add 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.
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
Built Distribution
Close
Hashes for django_dynamic_theme-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58568c195b8b6402bbb02fed9cd325793ba69ae3a8220e2131b00016d0a4d777 |
|
MD5 | 15788ea90d1ae4ea10bf51dddadf17d9 |
|
BLAKE2b-256 | 97d464fac5dd1990a3722f7f1e562b058560a7b674fa246407b12ce06d390930 |
Close
Hashes for django_dynamic_theme-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6130cf5217b8f54ce720b40943b61685a330a7938da3afcbdd60c1c7d190d5c |
|
MD5 | a47426f7aac690f70b17426d3988191d |
|
BLAKE2b-256 | 9abfa5d9c0de8903cf21010464477077c6ba500459c7af5852a7a7d836fbe8fb |