A Django app to config project theme
Project description
Django Theme
Django theme 是一个自定义系统主题风格的库,可以生成前端所需要的配置信息。
安装
pip install django-sca-theme
配置
一. 将 django_theme
添加到 INSTALLED_APPS
,就像这样:
INSTALLED_APPS = [
...
'django_theme',
]
二. 将 django_theme
的 URL 配置到项目的 urls.py
中:
path('polls/', include('polls.urls')),
三. 将设置好 MEDIA_ROOT
和 MEDIA_URL
到 settings.py
:
MEDIA_URL = '/theme/'
MEDIA_ROOT = BASE_DIR / '/theme'
四. 运行 python manage.py migrate
应用数据库修改
五. 运行 python manage.py runserver
,创建一个配置.
六. 请求 http://localhost:5000/api/system/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
django_sca_theme-0.1.1.tar.gz
(6.6 kB
view hashes)
Built Distribution
Close
Hashes for django_sca_theme-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5b5f8ba4b6f8d08ba8422f133111dd53f534f6d199cf6b6cafbc4b264f75dc5 |
|
MD5 | 7bcaa1290026f92d393f2f338eaebdf9 |
|
BLAKE2b-256 | 473da54ceeac9b7fb5bbd4ce6c371ad8e8fc437b70b1f6378d966e722f8c051e |