cwvreg.py
changeset 3655 af86ab65a282
parent 3451 6b46d73823f5
child 3674 387d51af966d
--- a/cwvreg.py	Tue Oct 13 12:04:36 2009 +0200
+++ b/cwvreg.py	Tue Oct 13 15:59:05 2009 +0200
@@ -174,12 +174,13 @@
 
 class ViewsRegistry(CWRegistry):
 
-    def main_template(self, req, oid='main-template', **kwargs):
+    def main_template(self, req, oid='main-template', rset=None, **kwargs):
         """display query by calling the given template (default to main),
         and returning the output as a string instead of requiring the [w]rite
         method as argument
         """
-        res = self.render(oid, req, **kwargs)
+        obj = self.select(oid, req, rset=rset, **kwargs)
+        res = obj.render(**kwargs)
         if isinstance(res, unicode):
             return res.encode(req.encoding)
         assert isinstance(res, str)