accept a __template parameter that specifies a different (main) template stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Fri, 03 Jul 2009 18:10:52 +0200
branchstable
changeset 2263 1f59cd5b710f
parent 2262 d0cec91ff4c5
child 2264 17b8a6ad58fc
accept a __template parameter that specifies a different (main) template
web/application.py
--- a/web/application.py	Fri Jul 03 18:02:24 2009 +0200
+++ b/web/application.py	Fri Jul 03 18:10:52 2009 +0200
@@ -404,8 +404,8 @@
         return self.vreg.main_template(req, template, view=view)
 
     def main_template_id(self, req):
-        template = req.property_value('ui.main-template')
-        if template not in self.vreg.registry('views') :
+        template = req.form.get('__template', req.property_value('ui.main-template'))
+        if template not in self.vreg.registry('views'):
             template = 'main-template'
         return template