Commits

percious  committed ae50e91
  • Participants
  • Parent commits 4c991b2

Comments (0)

Files changed (2)

File tg/controllers/decoratedcontroller.py

 
         self._initialize_validation_context()
 
-        pylons.request.start_response = self.start_response
+        pylons.request.start_response = getattr(self, 'start_response', None)
 
         remainder = remainder or []
         try:
             error_handler = controller
             output = error_handler(*remainder, **dict(params))
         elif hasattr(error_handler, 'im_self') and error_handler.im_self != controller:
-            output = error_handler(*remainder, **dict(params))
+            output = error_handler(error_handler.im_self, *remainder, **dict(params))
         else:
             output = error_handler(controller.im_self, *remainder, **dict(params))
 

File tg/tests/test_tg_controller_dispatch.py

 from wsgiref.simple_server import demo_app
 from wsgiref.validate import validator
 
+from pylons import config
+config['renderers'] = ['genshi', 'mako', 'json']
+
 def setup():
     setup_session_dir()
 def teardown():