crispy filter¶
Crispy filter lets you render a form or formset using django-crispy-forms elegantly div based fields. Let’s see a usage example:
{% load crispy_forms_tags %}
<form method="post" class="uniForm">
{{ my_formset|crispy }}
</form>
Add
{% load crispy_forms_tags %}
to the template.Append the
|crispy
filter to your form or formset context variable.If you are using
uni_form
template pack, don’t forget to add the class ‘uniForm’ to your form.Refresh and enjoy!
Using {% crispy %} tag because it rocks¶
As handy as the |crispy filter is, think of it as the built-in methods: as_table
, as_ul
and as_p
. You cannot tune up the output. The best way to make your forms crisp is using the {% crispy %} tag with forms. It will change how you do forms in Django.