Z3c.form

Latest version: v5.1

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

Scan your dependencies

Page 9 of 12

2.4.1

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

- Since version 2.3.4 ``applyChanges`` required that the value exists
when the field had a ``DictionaryField`` data manager otherwise it
broke with an ``AttributeError``. Restored previous behavior that
values need not to be exist before ``applyChanges`` was called by
using ``datamanager.query()`` instead of ``datamanager.get()`` to
get the previous value.

- Added missing dependency on ``zope.contentprovider``.

- No longer using deprecated ``zope.testing.doctest`` by using
python's built-in ``doctest`` module.

2.4.0

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

- Feature: mix fields and content providers in forms. This allow to enrich
the form by interlacing html snippets produced by content providers.
Adding html outside the widgets avoids the systematic need of
subclassing or changing the full widget rendering.

- Bug: Radio widget was not treating value as a list in hidden mode.

2.3.4

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

- Bugfix: applyChanges should not try to compare old and new values if the old
value can not be accessed.

- Fix DictionaryField to conform to the IDataManager spec: get() should raise
an exception if no value can be found.

2.3.3

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

- The last discriminator of the 'message' IValue adapter used in the
ErrorViewSnippet is called 'content', but it was looked up as the error view
itself. It is now looked up on the form's context.

- Don't let util.getSpecification() generate an interface more than once.
This causes strange effects when used in value adapters: if two adapters
use e.g. ISchema['some_field'] as a "discriminator" for 'field', with one
adapter being more specific on a discriminator that comes later in the
discriminator list (e.g. 'form' for an ErrorViewMessage), then depending on
the order in which these two were set up, the adapter specialisation may
differ, giving unexpected results that make it look like the adapter
registry is picking the wrong adapter.

- Fix trivial test failures on Python 2.4 stemming from differences in
pprint's sorting of dicts.

- Don't invoke render() when publishing the form as a view if the HTTP status
code has been set to one in the 3xx range (e.g. a redirect or not-modified
response) - the response body will be ignored by the browser anyway.

- Handle Invalid exceptions from constraints and field validators.

- Don't create unnecessary self.items in update() method of
SelectWidget in DISPLAY_MODE. Now items is a property.

- Add hidden widget templates for radio buttons and checkboxes.

2.3.2

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

- Reverted changes made in the previous release as the ``getContent``
method can return anything it wants to as long as a data manager can
map the fields to it. So ``context`` should be used for group
instantiation. In cases where ``context`` is not wanted, the group
can be instantiated in the ``update`` method of its parent group or
form. See also
https://mail.zope.org/pipermail/zope-dev/2010-January/039334.html

(So version 2.3.2 is the same as version 2.3.0.)

2.3.1

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

- ``GroupForm`` and ``Group`` now use ``getContent`` method when
instantiating group classes instead of directly accessing
``self.context``.

Page 9 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.