问题:在使用django-crispy-forms时,跳转到signup页面出错
django.template.exceptions.TemplateDoesNotExist: bootstrap4/uni_form.html
解决方法:
使用bootstrap5
1. 安装crispy-bootstrap5
Install this plugin using pip:
$ pip install crispy-bootstrap5
2. 在setting.py文件中添加代码
INSTALLED_APPS = (
...
"crispy_forms",
"crispy_bootstrap5",
...
)
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5"
CRISPY_TEMPLATE_PACK = "bootstrap5"
参考链接:https://github.com/django-crispy-forms/crispy-bootstrap5
标签:form,TemplateDoesNotExist,django,forms,html,bootstrap4,bootstrap5,crispy From: https://www.cnblogs.com/chrisxyz/p/17145751.html