Creating a form layout with django-crispy-forms

The django-crispy-forms Django app allows you to build, customize, and reuse forms using one of the following CSS frameworks: Uni-Form, Bootstrap, or Foundation. The usage of django-crispy-forms is analogous to fieldsets in the Django contributed administration; however, it is more advanced and customizable. You define form layout in the Python code and you don't need to worry about how each field is presented in HTML. However, if you need to add specific HTML attributes or wrapping, you can easily do that too. Moreover, all the markup used by django-crispy-forms is located in the templates that can be overwritten for specific needs.

In this recipe, we will see an example of how to use django-crispy-forms ...

Get Web Development with Django Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.