Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update django-crispy-forms to 2.3 #1417

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

pyup-bot
Copy link
Collaborator

This PR updates django-crispy-forms from 1.7.0 to 2.3.

Changelog

2.3

* Fixed a bug in `AccordionGroup` rendering then it gets an unexpected css class `active`.

2.2

* Added support for Django 5.1.
* Allowed pass through of context when rendering a ``Fieldset`` layout object.

2.1

* Added support for Django 5.0.
* Dropped support for Django 3.2, 4.0 and 4.1.
* Added support for Python 3.12.
* Dropped support for Python 3.7.

See the [2.1 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/20?closed=1) for the full change
list.

2.0

Release of django-crispy-forms 2.0. No changes introduced since 2.0a1.

2.0a1

Major Changes and Migration Guide
* Removed all Bootstrap template packs. These template packs are now available as standalone packages.
To upgrade, install the required template pack and add it to your
[`INSTALLED_APPS`](https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-INSTALLED_APPS) setting.

 * Boostrap 2: [PyPI](https://pypi.org/project/crispy-forms-bootstrap2/) -- [GitHub](https://github.com/django-crispy-forms/crispy-forms-bootstrap2)
 * Boostrap 3: [PyPI](https://pypi.org/project/crispy-bootstrap3/) -- [GitHub](https://github.com/django-crispy-forms/crispy-bootstrap3)
 * Boostrap 4: [PyPI](https://pypi.org/project/crispy-bootstrap4/) -- [GitHub](https://github.com/django-crispy-forms/crispy-bootstrap4)

Also, support for Bootstrap 5 is provided by a 3rd party package under the `django-crispy-forms` organisation at
[crispy-bootstrap5](https://github.com/django-crispy-forms/crispy-bootstrap5).

* Removed uni-form template pack. Uni-Form specific classes previously added to every template pack e.g. `textInput` are now removed.
If you require these classes, the previous behaviour can be restored by adding the following to [CRISPY_CLASS_CONVERTERS](https://django-crispy-forms.readthedocs.io/en/latest/crispy_tag_forms.html#change-crispy-forms-input-default-classes) in your settings file.


 converters = {
   "textinput": "textinput textInput",
   "fileinput": "fileinput fileUpload",
   "passwordinput": "textinput textInput",
}


* The `uni-form` template pack allowed for rendering of templates using a `default` or `inline` layout. As the `uni-form` template
pack has been removed support for this has also been removed. This has resulted in the following **BREAKING** changes.

 * The `form_style` attribute of `FormHelper` is removed.
 * The `form_style` positional argument to `render_field()` is removed.
 * The `form_style` positional argument to the `render()` method of all `LayoutObjects` is removed.

Audit for use of `render()` and `render_field()` due to the removal of the `form_style` positional argument is therefore
required. For example:


django-crispy-forms 1.x
html = my_layout_object.render(form, form_style, context)
django-crispy-forms 2.x
html = my_layout_object.render(form, context)


* Widespread use of the `|safe` in crispy-form templates is removed. Audit for html input in your forms
especially for Field and Prepended/Appended text. To retain the previous behaviour mark text as safe
in your project code using
[`mark_safe()`](https://docs.djangoproject.com/en/4.0/ref/utils/#django.utils.safestring.mark_safe). Refs 296.

Other Changes
* Dropped support for Django 2.2.
* Added support for Django 4.1 and 4.2.
* Added support for Python 3.11.
* The `flat_attrs()` method of `FormActions` is removed. Attributes provided by `**kwargs` are now passed via the `flat_attrs` function during `__init__()` instead of with each call of `render()`
* The `html5_required` attribute of `FormHelper` is removed. In all supported versions of Django the `required` attribute is provided by the core `forms` module.
* The `FormActions` layout object learnt a `css_id` kwarg to add an `id` to the rendered `<div>`
* The default values of "form_error_title" and "formset_error_title" of FormHelper changed from `None` to `""`.
* An attribute error is now raised if the `CRISPY_TEMPLATE_PACK` setting is not provided.
* The `get_layout_objects()` and `get_field_names()` functions of `LayoutObject` now return a list of `Pointers` rather than a list
of lists. Pointers are a `dataclass` containing a list of `posistions` and the `name` of object/field.

1.14.0

* Added support for Python 3.10
* Dropped support for Django 3.1
* Dropped support for Python 3.6
* Added bootstrap modal layout object (1204)
* Added `input_size` argument to `FieldWithButtons` to allow customisation of the size of the input in the Bootstrap 4
template pack. (1159)

See the [1.14.0 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/18?closed=1) for the full change list.

1.13.0

* Added support for Django 4.0

1.12.0

* Fixed rendering of grouped checkboxes and radio inputs in the Bootstrap 4 template pack. (1155)
* Introduced new `input_size` argument to `AppendedText`, `PrependedText` and `PrependedAppendedText`. This allows
the size of these grouped inputs to be changed in the Bootstrap 4 template pack. (1114)
* Confirmed support for Django 3.2
* Dropped support for Python 3.5
* Dropped support for Django 3.0

See the [1.12.0 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/16?closed=1) for the full change list.

1.11.2

* Added HTML parsing tools to help testing of template packs (1128)
* Fixed rendering of all widget attributes for file fields (1130)

See the [1.11.2 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/15?closed=1) for the full change list.

1.11.1

* Added `custom-select` for select widgets within prepended and appended fields (1116)

See the [1.11.1 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/14?closed=1) for the full change list.

1.11.0

* Implemeneted `custom-select` for Select widgets in the Bootstrap4 Template Pack (1091)
* Fixed `data-parent` in AccodrianGroup (1091)
* Documentation improvements

See the [1.11.0 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/13?closed=1) for the full change list

1.10.0

* Fixed test causing `SystemCheckError` in some cases. (1075)
* Radio and Checkbox now respect the field's `disabled` attribute when using the Bootstrap4 template pack. (1057)
* A number of documentation improvements.

See the [1.10.0 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/12?closed=1) for the full change list

1.9.2

* Fixed FileField UI bug

See the [1.9.2 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/11?closed=1) for the full change list.

1.9.1

* Added Bootstrap 4 styling for clearable file widget.
* Fixed FileField UI bug.
* Project now uses GitHub actions for testing.

See the [1.9.1 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/10) for the full change list.

1.9.0

* Removed support for Python 2.
* Removed support for Django versions prior to 2.2.
* CSS for Column layout object in Bootstrap 4 template pack changed to 'col-md'. Default is now over ridden when another 'col' class is added to css_class.

See the [1.9.0 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/9) for the full change list.

1.8.1

* Fixing FileField UI bug introduced with 1.8.0
* Remove is-valid css class for radio (bug introduced with 1.8.0)
* Various alignment and margin fixes for Bootstrap 4 template pack
* Documentation : using read-the-docs template, documenting how to run test suite, documenting use_custom_control help attributes

See the [1.8.1 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/8?closed=1) for the full change list.

1.8.0

* Updated compatibility for Django 1.11, 2.1, 2.2 and 3.0 in line with Django's
supported versions policy.
* Numerous improvements to the Bootstrap 4 template pack, which may now be
considered mature.

Here are some changes that might affect custom templating you already have in
place when using Bootstrap 4 :

 * Using [Custom Forms for radio and checkbox](https://www.w3schools.com/bootstrap4/bootstrap_forms_custom.asp).
   You may disable this by setting  `FormHelper.use_custom_control = False`.
 * Using [Bootstrap 4 `"form-row"` class in place of `"row"`](https://getbootstrap.com/docs/4.3/components/forms/#form-row).
 * Fixing [layout hierarchy between input and its label for checkbox and radio](https://getbootstrap.com/docs/4.0/components/forms/#checkboxes-and-radios).

<small>Links are to the relevant Bootstap 4 docs.</small>

See the [1.8.0 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/7?closed=1) for the full change list.

Many thanks to all involved in bringing together a great release!

1.7.2

* Bugfixes following v1.7.1

See [1.7.1 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/6?closed=1)
for full issue list.

1.7.1

* Bootstrap 4 template pack.

See [1.7.1 Milestone](https://github.com/django-crispy-forms/django-crispy-forms/milestone/5?closed=1)
for full issue list.
Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant