--- a/web/form.py Thu Apr 09 12:34:40 2009 +0200
+++ b/web/form.py Thu Apr 09 12:35:03 2009 +0200
@@ -282,9 +282,11 @@
renderer = values.pop('renderer', FormRenderer())
return renderer.render(self, values)
- def form_build_context(self, values):
+ def form_build_context(self, values=None):
self.context = context = {}
# on validation error, we get a dictionnary of previously submitted values
+ if values is None:
+ values = {}
previous_values = self.req.data.get('formvalues')
if previous_values:
values.update(previous_values)