Skip to main content

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("", include("django_theme.urls")),

三. 将设置好 MEDIA_ROOTMEDIA_URLsettings.py:

MEDIA_URL = '/media/'
MEDIA_ROOT = BASE_DIR / '/media'

四. 运行 python manage.py migrate 应用数据库修改

五. 运行 python manage.py runserver,创建一个配置.

六. 请求 http://localhost:5000/api/system/theme 获取主题

Project details


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.2.0.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

django_sca_theme-0.2.0-py3-none-any.whl (11.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page