Commits

Author Commit Message Labels Comments Date
Thomas Johansson
Added equal_to validator. Validators now take the message argument as the last one. This is to allow validators like equal_to to use forced positional arguments. You should use message as a keyword argument. This is a backwards incompatible change.
Thomas Johansson
Small fix to email validator regexp.
Thomas Johansson
Normalize all validators: They now all follow the factory pattern and take the error message as first argument. Also added is_checked validator, and updated unittests accordingly.
Thomas Johansson
Bit too fast with the pasting there
Thomas Johansson
Add first basic unittests using py.test
Thomas Johansson
Improve URL validator
James Crasta
Created `form_for_model` function for making a form from Django models. Currently foreign keys and other relations are not supported, as are a few other fields we currently have no direct analog for, such as NullBooleanField. They will be silently skipped over. Currently this has only been tested with the django trunk.
James Crasta
Fix for _unbound_fields in subclassed forms being correct
James Crasta
Minor fix which makes ordered form fields not break inheritance also small typo fix in __init__.py
James Crasta
Add contrib feature to setup.py so we can have it on PyPI
James Crasta
Added missing module docstrings, updated copyright year on all others to 2008. Put in docs to be shown in PyPI page in docstring because I'm too lazy to do it on every upload.
James Crasta
Form._fields is now a sequence of (name, value) tuples. This cleans up all the use-cases like iteration. Also fixed a small bug in instantiation where we were needlessly getting the field again even though we had it.
James Crasta
Implement iterating fields in order. Fixes #7. This is achieved by keeping a creation counter on the partially-instantiated fields and then building a sorted list of fields on the first instantiation of the form. The reason we don't do this in a metaclass is that to make it friendly to monkey-patched form classes which add/remove fields was a significant amount more code to support than doing it on the first instantiation. While this functionality will stay in the application, the implementation details are likely to change in the near future. don't write code which relies on Field.creation_counter or Form._unbound_fields.
James Crasta
Added FileField to allow rendering file-input boxes. This does not provide actual handling of file data, but will allow generating the widget from the form and will take any data given by the browser in the POST (probably the filename) Refs #10
James Crasta
dded contrib package for django support. This package includes a templatetag which makes wtforms integration with django templates cleaner. Refs #9
James Crasta
Make validation work without error on python 2.4/2.5. Also make ValueError allowed as a validation error. Refs #2, fixes #11
James Crasta
Compatibility fix for python 2.3/2.4 to allow partially initialized formfields to be instantiated in the form without error.
Thomas Johansson
Fix value bug in BooleanField.process_data; Looks like we were a bit too fast with the 2.4 support there. Thanks to hads for reporting the bug.
Thomas Johansson
diaf tabs
Thomas Johansson
Bit too fast there, only yielding values. Also fix whitespace, stupid tabs. Really fixes #6 this time.
Thomas Johansson
Make form iterable, yielding the fields, based on suggestion from benoitc. Fixes #6.
Thomas Johansson
Add HiddenField, derived from TextField. Fixes #5
Thomas Johansson
Label return should always be unicode
James Crasta
Python 2.3/2.4 compatibility: changed a generator expression to be a list comprehension, and set up a functools.partial replacement. WTForms now works on python 2.3. Refs #2
Thomas Johansson
Label and validators are now completely optional.
Thomas Johansson
merged
James Crasta
setup.py is now executable, and wtforms is now zip safe.
Thomas Johansson
General processing cleanup: * Rename process_modeldata to process_data to clarify usage. * Rename in_form to has_formdata, also to clarify usage. * Call process_data on kwarg provided values, not just values provided by the data object. * Rename Form init 'model' parameter to 'obj'; It can be any object, as long as it has attributes named after the fields on the form.
Thomas Johansson
Add specific support for class_, class__ to html_params, to play nice with mako and genshi. These will strip the final underscore in the output, so class_ becomes class and class__ becomes class_.
Thomas Johansson
add artwork
  1. Prev
  2. Next