Django crispy-forms cannot find CSS
I am using Django and Crispy Forms. I can get the form to render correctly, but no CSS formatting appears. What do I need to do?
I added
CRISPY_TEMPLATE_PACK = 'bootstrap'
to my settings.py
file.
The html file is simple as it gets:
{% extends 'base.html' %}
{% load crispy_forms_tags %}
{% block content %}
{% crispy form %}
{% endblock %}
What else does it take to make it work? I understand that since the bootstrap files come bundled with crispy_forms, I don't need to copy and reference them specifically in my project CSS path. Is it correct?
source to share
Sounds like your django instance can't find files static
for crispy forms. If you are using a development server, have you included 'crispy_forms'
in INSTALLED_APPS
?
If you are on a production server, you will probably need to make sure your paths STATIC_FILES
are correct and you have recently started collectstatic
.
The authors recorded the installation process here - did you fully comply with this?
source to share