web/application.py
branchtls-sprint
changeset 823 cb8ccbef8fa5
parent 661 4f61eb8a96b7
child 832 8e06873d80d3
--- a/web/application.py	Wed Feb 18 18:06:41 2009 +0100
+++ b/web/application.py	Wed Feb 18 19:19:57 2009 +0100
@@ -384,7 +384,8 @@
             if tb:
                 req.data['excinfo'] = excinfo
             req.form['vid'] = 'error'
-            content = self.vreg.main_template(req, 'main')
+            errview = self.vreg.select_view('error', req, None)
+            content = self.vreg.main_template(req, 'main-template', view=errview)
         except:
             content = self.vreg.main_template(req, 'error')
         raise StatusResponse(500, content)
@@ -396,9 +397,10 @@
         return self.vreg.main_template(req, 'loggedout')
     
     def notfound_content(self, req):
-        template = req.property_value('ui.main-template') or 'main'
+        template = req.property_value('ui.main-template') or 'main-template'
         req.form['vid'] = '404'
-        return self.vreg.main_template(req, template)
+        view404 = self.vreg.select_view('404', req, None)
+        return self.vreg.main_template(req, template, view=view)
 
 
 set_log_methods(CubicWebPublisher, LOGGER)