------------------
Bug Fixes
~~~~~~~~~
- Fixed remove bug in nested sequences. See
https://github.com/Pylons/deform/pull/89
- Fixed bug wherein items added to a sequence nor the initial items rendered
in a sequence would not reflect the correct defaults of the item widget.
See https://github.com/Pylons/deform/pull/79
- Fix bug where native datetime/date widget rendering competed with jQuery
datetime/date widget rendering. See
https://github.com/Pylons/deform/pull/142
Dependencies
~~~~~~~~~~~~
- Depend on and use zope.deprecation to deprecate Set class.
- Deform now depends on Colander >= 1.0a1 (previously it depended on >= 0.8).
It requires Colander 1.0a1's newer ``cstruct_children`` and
``appstruct_children`` methods of schema objects as well as being able to
import objects from Colander that don't exist in earlier versions.
- Deform now depends on Chameleon >= 2.5.1 (previously it depended on
>= 1.2.3). It requires the Markup class supplied by this version or better.
- Deform no longer has a setup_requires dependency on setuptools_git
(useless, as the version on PyPI is broken).
- Setup.py now includes all testing requirements in tests_require that are in
testing extras and vice versa.
Features
~~~~~~~~
- Allow SelectWidget to produce <optgroup> HTML tags. See
https://github.com/Pylons/deform/pull/87
- Allow ``deform.form.Form`` constructor to accept an ``autocomplete``
keyword argument, which controls the ``autocomplete`` attribute of the form
tag.
- Add Python 3.3 Trove classifier.
- Pass through unknown keys in a ``filedict`` FileData serialization (FBO of
passing out of band information).
- ``deform.Set`` type deprecated in favor of use of ``colander.Set``.
- Give the preview_url method of the tempstore access to the stored
item. [tomster]
- Add ``style`` attribute/arguments to textinput-related widgets allowing you
to set the style of the tag by hand.
- Allow ``deform.widget.SequenceWidget`` constructor to accept an ``orderable``
keyword argument. Default is ``False``. If ``True``, allow drag-and-drop
reordering of SequenceWidget items (via jQuery UI Sortable).
- The default widget for the colander.Money type is now
deform.widgets.MoneyInputWidget.
- Built-in widgets may have a 'readonly' attribute/constructor-argument, to
indicate that a form field associated with the widget should use its
readonly template instead of its normal readwrite template. A ``readonly``
keyword argument can still be passed to ``Field.serialize`` to render a
field as readonly, like in older versions.
- ``deform.field.Field`` now has a ``__contains__`` method, which returns
``True`` if the named field is a subfield of the field on which it is
called.
- ``deform.field.Field`` now has a ``validate_pstruct`` method which works
like ``validate`` except it accepts a pstruct directly instead of accepting
a list of controls.
- ``deform.field.Field.validate`` now accepts a ``subcontrol`` argument for
validating a submapping of a form.
- In support of "retail" form rendering, the ``serialize`` method of widgets
now accepts arbitrary keyword arguments. These are used as top-level value
overrides to widget templates.
- In support of "retail" form rendering, the ``serialize`` method of a Field
now accepts arbitrary keyword arguments. These are passed along to it's
widget's ``serialize`` method.
- It is now possible to pass an ``appstruct`` argument to the
``deform.Field`` (and by extension, the ``deform.Form``) constructor. When
you do so, you can omit passing an ``appstruct`` argument to the ``render``
method of the field/form. Fields set a cstruct value recursively when
supplied with an ``appstruct`` argument to their constructor. This is in
support of "retail" form rendering.
- Form/field objects are now initialized with a cstruct (recursively) when
created. This means that accessing form.cstruct will return the current
set of rendering values. This value is reset during validation, so after a
validation is done you can re-render the form to show validation errors.
This is in support of "retail" form rendering.
- Form/field objects now have peppercorn-field-outputting methods:
``start_mapping``, ``end_mapping``, ``start_sequence``, ``end_sequence``,
``start_rename``, ``end_rename`` in support of retail form rendering.
- The ``deform.Field`` (and therefore ``deform.Form``) classes now expose a
``render_template`` method, which injects ``field`` and ``cstruct`` into
the dictionary passed to the template if they don't already exist in the
``**kw`` passed. This is in support of retail form rendering.
- Add ``set_appstruct`` and ``set_pstruct`` methods to Field; these accept,
respectively, an appstruct or a pstruct and set the cstruct related to the
field to the deserialized or serialized value.
Documentation
~~~~~~~~~~~~~
- Add a (weak) "Retail Form Rendering" chapter to the docs.