Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 938
Luke Acko13 Avatar asked Jan 24 '26 13:01

Luke Acko13


2 Answers

install this version of django-crispy-forms "django-crispy-forms==1.14.0" and your problems will be solved.

like image 99
Ifiok Sampson Avatar answered Jan 27 '26 03:01

Ifiok Sampson


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

like image 31
David Smith Avatar answered Jan 27 '26 01:01

David Smith