'bootstrap_tags' is not a valid tag library

独自空忆成欢 提交于 2019-12-05 16:18:46
Zhen Xie

This error is due to the django_forms_bootstrap Python package not being installed; therefore, the django.forms.bootstrap import is failing.

pip install django_forms_bootstrap

Then add 'django_forms_bootstrap' to INSTALLED_APPS in settings.py

and then restart your website or runserver.

An update...

if you upgrade it to bootstrap4, you will face this error:

'bootstrap4' is not a registered tag library.

To solve it for Bootstrap4: official website link

Or use the easy installation feature in Python:

pip install django-bootstrap4
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!