--- a/web/views/forms.py Fri Oct 22 11:06:57 2010 +0200
+++ b/web/views/forms.py Fri Oct 22 13:09:09 2010 +0200
@@ -50,6 +50,7 @@
from logilab.common.deprecation import deprecated
from cubicweb import typed_eid
+from cubicweb.utils import support_args
from cubicweb.selectors import non_final_entity, match_kwargs, one_line_rset
from cubicweb.web import uicfg, form, formwidgets as fwdgs
from cubicweb.web.formfields import relvoc_unrelated, guess_field
@@ -179,7 +180,12 @@
self.build_context(formvalues)
if renderer is None:
renderer = self.default_renderer()
- renderer.render(w, self, kwargs)
+ if support_args(renderer.render, 'w'):
+ renderer.render(w, self, kwargs)
+ else:
+ warn('[3.10] you should add "w" as first argument o %s.render()'
+ % renderer.__class__, DeprecationWarning)
+ w(renderer.render(self, kwargs))
if data is not None:
return '\n'.join(data)