django xadmin: 'TemplateSyntaxError at /xadmin/ 'crispy_forms_tags' is not a registered tag library'

django xadmin报错: ‘TemplateSyntaxError at /xadmin/ ‘crispy_forms_tags’ is not a registered tag library ……’

报错详情:

TemplateSyntaxError at /xadmin/
'crispy_forms_tags' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_static
admin_urls
cache
i18n
l10n
log
rest_framework
static
staticfiles
tz
xadmin_tags
Request Method:	GET
Request URL:	http://127.0.0.1:8000/xadmin/
Django Version:	1.11
Exception Type:	TemplateSyntaxError
Exception Value:	
'crispy_forms_tags' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_static
admin_urls
cache
i18n
l10n
log
rest_framework
static
staticfiles
tz
xadmin_tags
Exception Location:	F:\Projects\VueShop\lib\site-packages\django\template\defaulttags.py in find_library, line 1042
Python Executable:	F:\Projects\VueShop\Scripts\python.exe
Python Version:	3.6.4
Python Path:	
['F:\\Projects\\ElectricalFreash\\extra_apps',
 'F:\\Projects\\ElectricalFreash',
 'F:\\Projects\\ElectricalFreash',
 'F:\\Projects\\ElectricalFreash',
 'F:\\Projects\\VueShop\\Scripts\\python36.zip',
 'F:\\Projects\\VueShop\\DLLs',
 'F:\\Projects\\VueShop\\lib',
 'F:\\Projects\\VueShop\\Scripts',
 'e:\\anaconda3\\Lib',
 'e:\\anaconda3\\DLLs',
 'F:\\Projects\\VueShop',
 'F:\\Projects\\VueShop\\lib\\site-packages',
 'D:\\PyCharm 2017.3.3\\helpers\\pycharm_matplotlib_backend']
Server time:	星期四, 14 二月 2019 01:18:48 +0800

在这里插入图片描述

报错原因:运行环境中缺少了django-crispy-forms模块

解决方法:安装django-crispy-forms

pip inistall django-crispy-forms
并且在settings.py文件中配置crispy-forms
INSTALLED_APPS = [
    ……
    'xadmin',
    'crispy_forms',
    ……
]
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值