django-crispy-forms v2.0 Release Notes
-
✂ Removed
|safefilter from field and prepended/appended text. To retain the previous behaviour usemark_safe()to mark the text as safe in your project. Refs #296.✂ Removed uni-form template pack. Uni-Form specific classes previously added to every template pack e.g.
textInputand are now removed. If you require these classes then the previous behaviour can be restored by adding the following to CRISPY_CLASS_CONVERTERS in your settings file.
converters = { "textinput": "textinput textInput", "fileinput": "fileinput fileUpload", "passwordinput": "textinput textInput", }0️⃣ The
uni-formtemplate pack allowed for rendering of templates using adefaultorinlinelayout. As theuni-formtemplate pack has been removed support for this has also been removed. This has resulted in the following BREAKING changes.- The
form_styleattribute ofFormHelperis removed. - The
form_stylepositional argument torender_fieldis removed. - The
form_stylepositional argument to therendermethod of allLayoutObjectsis removed.
- The
✂ Removed Bootstrap 2 template pack. Bootstrap 3 and 4 support is provided by the core crispy-forms package. Support for Bootstrap 5 is provided by a 3rd party package under the
django-crispy-formsorganisation at crispy-bootstrap5.Default template pack is now
bootstrap4if theCRISPY_TEMPLATE_PACKsetting is not provided.The
get_layout_objects()andget_field_names()functions ofLayoutObjectnow return a list ofPointersrather than a list of lists. Pointers are adataclasscontaining a list ofposistionsand thenameof object/field.🚚 The
html5_requiredattribute ofFormHelperis removed. In all supported versions of Django therequiredattribute is provided by the coreformsmodule.The
FormActionslayout object learnt acss_idkwarg to add anidto the rendered<div>🚚 The
flat_attrs()method ofFormActionsis removed. Attributes provided by**kwargsare now passed via theflat_attrsfunction during__init__()instead of with each call ofrender().The default values of "form_error_title" and "formset_error_title" of FormHelper changed from
Noneto"".⬇️ Dropped support for Django 2.2.
➕ Added support for Django 4.1.