Deform

Latest version: v2.0.15

Safety actively analyzes 623586 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

3.0.0

------------------

2.0.15

-------------------


Features and Fixes
^^^^^^^^^^^^^^^^^^

- Add support of Python 3.8 and 3.9.

- Added a new widget ``SelectizeWidget`` based on the jQuery plugin
`selectize.js <https://github.com/selectize/selectize.js>`_. [stevepiercy]
https://github.com/Pylons/deform/issues/260

- Improved handling of the ``readonly`` HTML attribute in certain widgets. The
``readonly`` HTML form control attribute makes the element not mutable,
meaning the user cannot edit the control. When ``"readonly": "readonly"`` is
one of the items in a dict passed into the ``attributes`` option when
creating a widget, the rendered widget both prevents the user from changing
the value, and if the form does not pass validation after submitted then the
field value will be displayed.

``readonly`` is supported by most form controls, but not all. Deform adds
some logic to add read-only support for a few of those form controls, as
described below.

``CheckboxWidget`` and ``CheckboxChoiceWidget``
Due to the nature of how checkbox values are processed, the ``readonly``
attribute has no effect.
To achieve a read-only behavior, pass in ``attributes={"onclick": "return
false;"}``.
This will render as an inline JavaScript ``onclick="return false;"`` for
each checkbox item.

``MoneyInputWidget``
The provided value will be displayed in the input and be not editable.

``RadioChoiceWidget``
For the selected value it will render an attribute in the HTML as
``readonly="readonly"``, and for all other values as
``disabled="disabled"``.

``SelectWidget``
For selection of single options only, the selected value will render an
attribute in the HTML as ``readonly="readonly"``, and for all other values
as ``disabled="disabled"``.
Multiple selections, set by the ``multiple=True`` option, do not support
the ``readonly`` attribute on the ``<select>`` element.
For multiple selections, use the ``SelectizeWidget``.

``SelectizeWidget``
For both single and multiple selections, the selected value or values will
be rendered as selected, and the others will not be selectable.
Selectize uses JavaScript to "lock" the form control.

``TextAreaWidget``
The provided value will be displayed in the input and be not editable.

``TextInputWidget``
The provided value will be displayed in the input and be not editable.

[stevepiercy]
https://github.com/Pylons/deform/issues/260

- Optionally bypass the resource registry and specify a resource as a dict
where its keys are the type of asset (``"js"`` or ``"css"``) and its values
are either a string or a list of strings of paths to assets on disk.
[tdamsma]
https://github.com/Pylons/deform/issues/485

- Conditionally load ``jquery.maskedinput`` if and only if ``mask`` option is
provided. [tisdall, stevepiercy]
https://github.com/Pylons/deform/pull/487

- Changed dateparts widget to use ``type="number"`` instead of default
``text``. [stevepiercy]
https://github.com/Pylons/deform/issues/442

- Clarify that a sequence type (list, tuple, or x/range) is required for values
passed into a ``SelectWidget`` or ``RadioChoiceWidget``. [stevepiercy]
https://github.com/Pylons/deform/issues/385

- Switch from using nosetests to pytest as the test runner, as nosetests is no
longer maintained. [stevepiercy]
https://github.com/Pylons/deform/pull/497
https://github.com/Pylons/deform/pull/498

- Switch from Travis-CI and Appveyor to GitHub Actions, due to Travis-CI
changing its plans to be ineffective for the Pylons Project. [stevepiercy]
https://github.com/Pylons/deform/pull/492
https://github.com/Pylons/deform/pull/495

- Add Docker containerization of Deform and deformdemo as an option for running
tests, and improve related documentation. [sydoluciani]
https://github.com/Pylons/deform/pull/493
https://github.com/Pylons/deform/pull/494


Deprecations
^^^^^^^^^^^^

- Drop support of Python 3.5.

- ``Select2Widget`` is now deprecated and will be removed in Deform 3.0.0
because its jQuery plugin Select2 removed a lock feature in v4.0.0 and its
future development is uncertain. [stevepiercy]
https://github.com/Pylons/deform/issues/260


Documentation
^^^^^^^^^^^^^

- Add documentation of arbitrary HTML5 attributes for all widgets.
[stevepiercy]
https://github.com/Pylons/deform/issues/430

- Add usage documentation of ``Date``, ``DateTime``, and ``Time`` widgets. Add
documentation reference to complex data loading, changing widgets, or
validating data to Colander. [stevepiercy]
https://github.com/Pylons/deform/pull/466

2.0.14

-------------------

- Field.validate() now raises ``ValidationFailure`` upon peppercorn parse
failure.
See https://github.com/Pylons/deform/pull/242

- Bump maskMoney.js to 3.1.1 and use minified version.
https://github.com/Pylons/deform/issues/412

2.0.13

-------------------

- ``richtext.pt``: The contents of the ``RichTextWidget``'s <textarea>
was not HTML-escaped, but now it is.

Note that unescaped content is still rendered if ``delayed_load`` is
enabled. Now, however, to avoid rendering unescaped non-validated
user input, ``delayed_load`` is ignored when redisplaying a field
containing an error.
See https://github.com/Pylons/deform/pull/204

- This time, *really* update select2 widget to version 4.0.13.
See https://github.com/Pylons/deform/pull/459

2.0.12

-------------------

- Update select2 widget to version 4.0.13.
See https://github.com/Pylons/deform/pull/441

- Add the ``structure`` keyword to the autocomplete template's options to stop
its encoding.
See https://github.com/Pylons/deform/pull/445

- Use the local HTML element for change event when removing/adding to DOM.
See https://github.com/Pylons/deform/pull/331

- Fix deprecation warning when importing the module ``field.py`` while testing
with pytest.
See https://github.com/Pylons/deform/pull/419

- Fix a bug that was introduced in 2.0.11 that made it such that the ``focus``
parameter on forms did not honor the ``off`` value for ``checkboxChoice`` and
``radioChoice`` widgets.
See https://github.com/Pylons/deform/pull/453

- Remove the unused variable ``namematch`` from deform.js.
See https://github.com/Pylons/deform/pull/454

- Add i18n domain and Bootstrap styles to template ``readonly/password.pt``.
See https://github.com/Pylons/deform/pull/237

2.0.11

-------------------

- Drop support of Python 3.4.

- Changed the implementation of input autofocus from JavaScript to an HTML5
input attribute.

Forms now have an optional ``focus`` parameter (``on`` or ``off``) and fields
have an optional ``autofocus`` parameter.

- If ``focus`` is ``on``, and at least one field has an ``autofocus``
schema parameter set to ``on``, the first of these fields will
receive focus on page load.
- If ``focus`` is ``on`` or omitted, and no field has an
``autofocus`` schema parameter set to ``on``, the first input of
the first form on the page will receive focus on page load.
- If ``focus`` is ``off``, no focusing will be done.

Default: ``on``.
(This is unchanged from the JavaScript implementation.)

See https://github.com/Pylons/deform/pull/365/

- Replace the flake8-isort plugin with plain old isort.
See https://github.com/Pylons/deform/pull/427

- Improved the script that launches Selenium webdriver to clean up the locale
directory after completing a run of functional tests so that its files do not
get committed by accident. We also enforce coding style and add a formatter,
and improved the contributing documentation.
See https://github.com/Pylons/deform/pull/428

- Updated Bootstrap to 3.4.1.

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.