Minor documentation fix. #701
Refactoring: split fields/core.py and fields/simple.py #710
Drop support for Python < 3.6. #554
Specified version of Babel required for setup to avoid errors. #430
Replaced use of
setattrwith regular variable access. #482
Fixed a bug when the
SelectFieldchoices are list of strings. #598
This release includes the translation files that were missing in the 2.3.2 release. #641
All modules in
wtforms.extshow a deprecation warning on import. They will be removed in version 3.0.
extra_validatorsparameter, mapping field names to lists of extra validator functions. This matches
Update locale catalogs.
Drop support for Python 2.6, 3.3, and 3.4.
Permitted underscores in
Fixed broken format string in Arabic translation #471
Updated Ukrainian translation. #433
RangeInputdon’t render the
step="1"attribute by default. #343
form.errorsis not cached and will update if an error is appended to a field after access. #568
Choices which name and data are the same do not need to use tuples. #526
HTML is escaped using MarkupSafe instead of the previous internal implementation.
escape_html()is removed, replaced by
HTMLStringis removed, replaced by
Email validation is now handled by an optional library,
Merged new and updated translations from the community.
data_args to render a field converts all the underscores to hyphens when rendering the HTML attribute, not just the first one.
html5.TimeFieldwere added. #254
Fix a compatibility issue with SQLAlchemy 2.1 that caused
QuerySelectFieldto fail with
ValueError: too many values to unpack. #391
render_kwto allow default rendering time options.
Updated / added a number of localizations.
Allow widgets to set flags.
Added more localizations and updated some.
Validators for email and URL can validate IDNA-encoded domain names and new TLDs.
Support localization files in
/usr/share/localefor distro packaging.
Update wheel install to conditionally install ordereddict for Python 2.6.
class Metaparadigm for much more powerful customization of WTForms.
Move i18n into core. Deprecate
Move CSRF into core. Deprecate
Fix issue rendering SelectFields with
DecimalFieldable to use babel locale-based number formatting.
Drop Python 3.2 support (Python3 support for 3.3+ only).
attr=Falseto WTForms widgets causes the value to be ignored.
wtforms.ext.sqlalchemyhas been removed.
Fix a bug in validators which causes translations to happen once then clobber any future translations.
ext.appengineminor cleanups / deprecation.
Allow blank string and the string
falseto be considered false values for
BooleanField(configurable). This is technically a breaking change, but it is not likely to affect the majority of users adversely.
ext.i18nform allows passing
LANGUAGESto the constructor.
Add widgets and field implementations for HTML5 specialty input types.
ext.appengineadd NDB support.
Add translations for Korean, Traditional Chinese.
Tests complete in python 3.2/3.3.
Localization for ru, fr.
Minor fixes in documentation for clarity.
FieldListnow can take validators on the entire
Fix issue with
Fix issue in
Field class now allows traversal in Django 1.4 templates.
We now support Python 2.x and 3.x on the same codebase, thanks to a lot of hard work by Vinay Sajip.
Add in ability to convert relationships to
Built-in localizations for more languages.
Better IP address validation, including IPv6 support.
NoneOfnow work properly formatting other datatypes than strings.
Optionalvalidator can optionally pass through whitespace.
Fixed issues related to building for Python 3 and Python pre-releases.
object_datato fields to get at the originally passed data.
Output HTML5 compact syntax by default.
Substantial code reorg, cleanup, and test improvements.
ext.csrffor a way to implement CSRF protection.
ext.sqlalchemysupports callable defaults.
model_formnow supports generating forms with the same ordering as model.
get_labellike the other ORM fields.
Add localization support for WTForms built-in messages.
Python 3 support (via 2to3).
An empty label string can be specified on fields if desired.
Optionwidget can now take kwargs customization.
Field subclasses can provide default validators as a class property.
DateTimeFieldcan take time in microseconds.
Numeric fields all set
Noneon coercion error for consistency.
Documentation: Substantial documentation improvements, including adding Crash Course as a Sphinx document.
get_labelsimilar to sqlalchemy equivalents.
ReferencePropertyFieldnow properly stores model object, not key.
ext.appenginevarious field fixes.
Fix issue in
Optionalwith non-string input.
Make numeric fields more consistent.
Improve test coverage substantially.
Dateutil fields render issue, and consistency issue.
Optionalvalidator failed when
Documentation: docs now mention HTML escaping functionality.
Add preliminary support for providing a translations object that can translate built-in validation and coercion errors.
HTML is now marked as safe (using
__html__) so that compatible templating engines will not auto-escape it.
All fields now have a
Fields which are select fields (including those in
.ext) can be iterated to produce options, and have an
Minor bugfixes and cleanup in
QuerySelectFieldto address behavioral consistency.
FloatField, based on
BaseFormclass which provides the core processing and validation functionality of
Formwithout requiring declarative subclassing.
Field labels now default to a humanized field name.
Fields now have a
short_nameproperty which is the un-prefixed name.
DecimalFieldnow rounds values for display without float coercion. See docs for details on how to format decimals.
ext.sqlalchemy.fieldsnow has an additional
QuerySelectMultipleField, and all fields can now support multiple-column primary keys.
ext.sqlalchemy.ormcontains tools for making forms from ORM models.
ext.dateutilfor flexible date-time parsing.
ext.appenginecontributed by Rodrigo Moraes.
Fields have much greater control over input processing. Filters have been added to implement a simple way to transform input data.
Added fields that encapsulate advanced data structures such as dynamic lists or child forms for more powerful field composing.
Fields now use widgets for rendering.
All built-in validators have been converted to classes to clean up the code.
Field.populatewere renamed to
populate_objto clarify that they populate another object, not the Form or Field. This is an API breaking change.
Dropped support for Python 2.3.
Several fixes were made to the code and tests to make WTForms compatible with Python 2.3/2.4.
Form’s properties can now be accessed via dictionary-style access such as
form['author']. This also has the intended effect of making variable lookups in Django templates more reliable.
Form and Field construction changes: Form now uses a metaclass to handle creating its
_unbound_fieldsproperty, and Field construction now gives an instance of the new
UnboundFieldclass instead of using a partial function application. These are both internal changes and do not change the API.
Fields are now responsible for their own validation, instead of mostly relying on
Form. There are also new
post_validatehooks on subfields, adding a great deal of flexibility when dealing with field-level validation. Note that this is an API breaking change if you have any subfields that override
Field.validate. These will need to be updated to use the new hooks.
process_datano longer accepts the
At form instantiation time,
process_datawill be called only once for each field. If a model object is provided which contains the property, then this value is used. Otherwise, a keyword argument if specified is used. Failing that, the field’s default value is used.
If any form data is sent,
process_formdatawill be called after
process_datafor each field. If no form data is available for the given field, it is called with an empty list.
wtforms.ext.djangohas been overhauled, both to mirror features and changes of the Django 1.0 release, and to add some useful fields for working with Django ORM data in forms.
checkerkeyword argument to
RadioFieldhas been renamed to
coerceto reflect the actual functionality of this callable.
We have documentation and unit tests!
Fields now have a
flagsproperty which contain boolean flags that are set either by the field itself or validators being specified on a field. The flags can then be used in checks in template or Python code.
Changed the way fields take parameters, they are no longer quasi magic. This is a breaking change. Please see the documentation for the new syntax.
Added optional description argument to
Field, accessible on the field as
description. This provides an easy way to define e.g. help text in the same place as the form.
Added new semantics for validators which can stop the validation chain, with or without errors.
Added a regexp validator, and removed the
not_emptyvalidator in favour of two validators, optional and required. The new validators allow control over the validation chain in addition to checking emptiness.
wtforms.ext.django. This is a breaking change if you were using the Django extensions, but should only require changing your imports around a little.
Better support for other frameworks such as Pylons.