backported from appobject
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 13 Aug 2009 12:18:37 +0200
changeset 2823 a4e3e9b1a9cd
parent 2822 f26578339214
child 2824 3455f72010fe
backported from appobject
req.py
--- 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