req.py
changeset 2823 a4e3e9b1a9cd
parent 2808 497424219fb0
child 2825 87ac03aed941
--- a/req.py	Thu Aug 13 12:18:14 2009 +0200
+++ b/req.py	Thu Aug 13 12:18:37 2009 +0200
@@ -223,6 +223,12 @@
 
     # formating methods #######################################################
 
+    def view(self, __vid, rset=None, __fallback_oid=None, __registry='views',
+             **kwargs):
+        """shortcut to self.vreg.view method avoiding to pass the request"""
+        return self.vreg[__registry].render(__vid, self, __fallback_oid,
+                                            rset=rset, **kwargs)
+
     def format_date(self, date, date_format=None, time=False):
         """return a string for a date time according to instance's
         configuration