django soho ui base
Project description
开始使用
1、在INSTALLED_APPS中添加django_sohoui
INSTALLED_APPS = [
'django_sohoui',
'django.contrib.admin',
....
]
2、执行makemigrations
python manage.py makemigrations
python manage.py migrate
**3、 在TEMPLATES中添加context_processors **
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
## 添加custom_context
'django_sohoui.context_processors.custom_context',
]
4、 在project/urls.py中添加django_sohoui
urlpatterns = [
path('admin/', admin.site.urls),
## 添加django_sohoui
path('django_sohoui/', include('django_sohoui.urls')),
]
5、 在project/settings.py中添加LOGIN_BG_IMAGE(自定义登录页背景图片)
SOHO_LOGIN_BG_IMAGE = '/static/custom/images/logo_bg.jpg'
6、 在project/settings.py中添加SOHO_MENU_LIST
SOHO_MENU_LIST = {
'show_system_menu': True, ## 是否显示系统菜单
'models':[
{
'name': '苏豪菜单模块',
'models': [
{
'name': 'System菜单设置',
'admin_url': '/admin/django_sohoui/adminmenus/'
},
{
'name': 'System菜单设置1',
'admin_url': '/admin/django_sohoui/adminmenus/',
#自定义页面添加权限,admin model不需要指定权限
'permission': 'app.can_admin_sohoui_site'
}
]
},
]
}
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_sohoui-1.2.1.tar.gz
(6.6 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_sohoui-1.2.1.tar.gz.
File metadata
- Download URL: django_sohoui-1.2.1.tar.gz
- Upload date:
- Size: 6.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8eea173ab6c9b339ac732ea5f40dd2be0974eed2173ae77c521e38c2be7790f7
|
|
| MD5 |
80168324294b665f4d811b02b4128cca
|
|
| BLAKE2b-256 |
23d7e9a623d51be501cbcf0ab77330e31021ca40cadc258a4f5416dc9579b557
|
File details
Details for the file django_sohoui-1.2.1-py3-none-any.whl.
File metadata
- Download URL: django_sohoui-1.2.1-py3-none-any.whl
- Upload date:
- Size: 6.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f13c0f14f1849ec5f6eab0705b495cc84fcbc97e24bf6f89d7c0dc79a66887f0
|
|
| MD5 |
ebbed87c7a636798a0682b319fd4c41e
|
|
| BLAKE2b-256 |
8440822be4d7dc7370f9b9d4aa95bfe940e09787f326bbcc407b342d9a608086
|