首页 > 解决方案 > 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.

标签: pythonhtmldjangodjango-crispy-forms

解决方案


set CRISPY_TEMPLATE_PACK = 'bootstrap4'. Looks like you have it currently set to the full version number.


推荐阅读