Styling Forms Using Django Crispy Forms
Learn how to set up the Django Crispy Forms and use them to style the forms of the Django web app.
We'll cover the following
The leftover templates of our Django web app involve forms, so we will use Django Crispy Forms to style them.
Set up Django Crispy Forms
The following command installs the Django Crispy Forms:
pip install crispy-bootstrap5
Note: You don’t need to install it on Educative because we have set it up already.
To integrate the Django Crispy Forms in your app, we added the crispy_forms
and crispy_bootstrap5
to the INSTALLED_APPS
section in settings.py. In addition, we added the crispy template packs in lines 53–54.
Get hands-on with 1400+ tech skills courses.