python - Error when using crispy forms with Django and bootstrap
问题描述
I have created a sign in page for my blog, using bootstrap and django. I recently imported crispy forms and when I try and go to the page I get the following error: TemplateDoesNotExist at /register/
. However all my redirects and URLs are setup correctly.
On the Django debug it says that the error is in my base HTML file, under the head section where I imported bootstrap CSS. I can provide any code necessary. It says this on my server: django.template.exceptions.TemplateDoesNotExist: bootsrap4.4.1/uni_form.html
.
解决方案
set CRISPY_TEMPLATE_PACK = 'bootstrap4'
. Looks like you have it currently set to the full version number.
推荐阅读
- json - 邮递员如何在邮递员中解析具有动态键的嵌套 json 对象?
- dart - Flutter:在多个列表或列之间排序、拖放
- postgresql - 运行 mix ecto.setup 命令时连接被拒绝,使用 asdf 安装的软件包
- java - 如何使用按钮更改背景颜色?
- python - 预测用户评分
- google-domains - 如何为动态 DNS 配置 Google Domains?
- reactjs - 酶找不到类
- webpack - 为 ElectronJS + Vue 配置热模块重载
- jmespath - Does JMESPath have an identity function?
- django - “python -m django --version”1.11.18 无法更新到 2.1