https://github.com/django-admin-bootstrap/django-admin-bootstrap
http://wiki.jikexueyuan.com/project/django-set-up-blog/admin.html
Add into the INSTALLED_APPS before 'django.contrib.admin':
'bootstrap_admin', #一定要放在
django.contrib.admin
前面
from django.conf import global_settings
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [ # insert your TEMPLATE_DIRS here ],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
\# Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this
\# list if you haven't customized them:
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
'django.template.context_processors.request'
]
},
},]
BOOTSTRAP_ADMIN_SIDEBAR_MENU = True
主页:https://github.com/dyve/django-bootstrap-toolkit
给django增加bootstrap前端框架
http://www.ysgh.net/archives/553
https://github.com/django-admin-bootstrapped/django-admin-bootstrapped
Requirements Django ==1.8
With Django 1.6 use version 2.3.6
With Django 1.7 use version 2.4.0
Download it from PyPi with
pip install django-admin-bootstrapped
Add into the INSTALLED_APPS before 'django.contrib.admin':
'django_admin_bootstrapped',
```
DAB_FIELD_RENDERER = 'django_admin_bootstrapped.renderers.BootstrapFieldRenderer'
from django.contrib import messages
MESSAGE_TAGS = {
messages.SUCCESS: 'alert-success success',
messages.WARNING: 'alert-warning warning',
messages.ERROR: 'alert-danger error'
}
```
https://riccardo.forina.me/bootstrap-your-django-admin-in-3-minutes/
2024 - 快车库 - 我的知识库 重庆启连科技有限公司 渝ICP备16002641号-10
企客连连 表单助手 企服开发 榜单123