--- a/web/formfields.py Fri Nov 05 17:00:41 2010 +0100
+++ b/web/formfields.py Fri Nov 05 18:48:05 2010 +0100
@@ -428,7 +428,9 @@
vocab[i] = option
return vocab
- def format(self, form):
+ # support field as argument to avoid warning when used as format field value
+ # callback
+ def format(self, form, field=None):
"""return MIME type used for the given (text or bytes) field"""
if self.eidparam and self.role == 'subject':
entity = form.edited_entity
--- a/web/views/workflow.py Fri Nov 05 17:00:41 2010 +0100
+++ b/web/views/workflow.py Fri Nov 05 18:48:05 2010 +0100
@@ -104,7 +104,7 @@
'st1': entity.cw_adapt_to('IWorkflowable').printable_state,
'st2': self._cw._(transition.destination(entity).name)}
self.w(u'<p>%s</p>\n' % msg)
- self.w(form.render())
+ form.render(w=self.w)
def redirectpath(self, entity):
return entity.rest_path()