Django配置simpleui
参考
步骤
- 安装simpleui
pip3 install django-simpleui
- 在settings.py中,将simpleui加入到INSTALLED_APPS中
INSTALLED_APPS = [
'simpleui', # 配置该行
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'blogger',
'comment',
'post',
]
- 数据库迁移后运行
菜单栏图标配置
- 在settings.py中配置SIMPLEUI_ICON
SIMPLEUI_ICON={
'Bloggers':'fab fa-blogger', # 键为界面显示的菜单名称,值为https://fontawesome.com/icons/tag?style=regular中图标的class值
'Layouts':'fab fa-themeisle',
'Links':'fas fa-link',
'Posts':'fas fa-book',
'Comments':'far fa-comments',
'Categorys':'fas fa-tags'
}
效果图: