E&S CVS Commit: WebHaiku - More features, less cruft...
pje at eby-sarna.com
pje at eby-sarna.com
Sun Jan 14 13:51:41 EST 2007
Author: pje
Date: Sun Jan 14 13:51:40 2007
New Revision: 2263
URL: http://svn.eby-sarna.com?rev=2263&view=rev
Log:
More features, less cruft...
* @validator is now @form_handler, and it can also be used as
@form_handler(priority) to put the handlers in a priority order.
Each handler can return a WSGI response (in which case handling
is terminated) or None (in which case handler invocation continues).
When all handlers have been called, either self.form_failure() or
self.form_success() are invoked, according to whether self.errors
is empty.
* The Form class is no longer needed. POST handling is automatically
supported if any @form_handler methods are defined. To support
GET forms, add::
body = Page.POST
to your class, and GET handling will be identical to POST handling.
* self.parse_form() now returns the form data, but will only do the
parsing once. All pages can now have autogenerated attributes from
the form_data FieldStorage and the form_defaults dictionary.
Modified:
WebHaiku/web_haiku.py
More information about the source-changes
mailing list