--- a/appobject.py Thu Aug 13 09:31:34 2009 +0200
+++ b/appobject.py Thu Aug 13 09:41:05 2009 +0200
@@ -386,21 +386,6 @@
method = self.req.relative_path(includeparams=False) or 'view'
return self.req.build_url(method, **kwargs)
- # formating methods #######################################################
-
- def tal_render(self, template, variables):
- """render a precompiled page template with variables in the given
- dictionary as context
- """
- from cubicweb.ext.tal import CubicWebContext
- context = CubicWebContext()
- context.update({'self': self, 'rset': self.rset, '_' : self.req._,
- 'req': self.req, 'user': self.req.user})
- context.update(variables)
- output = UStringIO()
- template.expand(context, output)
- return output.getvalue()
-
# deprecated ###############################################################
@classproperty
--- a/view.py Thu Aug 13 09:31:34 2009 +0200
+++ b/view.py Thu Aug 13 09:41:05 2009 +0200
@@ -151,6 +151,19 @@
if stream is not None:
return self._stream.getvalue()
+ def tal_render(self, template, variables):
+ """render a precompiled page template with variables in the given
+ dictionary as context
+ """
+ from cubicweb.ext.tal import CubicWebContext
+ context = CubicWebContext()
+ context.update({'self': self, 'rset': self.rset, '_' : self.req._,
+ 'req': self.req, 'user': self.req.user})
+ context.update(variables)
+ output = UStringIO()
+ template.expand(context, output)
+ return output.getvalue()
+
dispatch = deprecated('[3.4] .dispatch is deprecated, use .render')(render)
# should default .call() method add a <div classs="section"> around each