diff pylons_app/config/middleware.py @ 86:e47d1db5ef20

Added few options to configs, Changed error middleware. TO basic pylons behavior
author Marcin Kuzminski <marcin@python-blog.com>
date Sun, 18 Apr 2010 20:06:35 +0200
parents 3ada2f409c1c
children 8b06c420491d
line wrap: on
line diff
--- a/pylons_app/config/middleware.py	Sun Apr 18 19:00:09 2010 +0200
+++ b/pylons_app/config/middleware.py	Sun Apr 18 20:06:35 2010 +0200
@@ -51,10 +51,9 @@
         # Display error documents for 401, 403, 404 status codes (and
         # 500 when debug is disabled)
         if asbool(config['debug']):
-            #don't handle 404, since mercurial does it for us.
-            app = StatusCodeRedirect(app, [400, 401, 403])
+            app = StatusCodeRedirect(app)
         else:
-            app = StatusCodeRedirect(app, [400, 401, 403, 500])
+            app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])
     
     # Establish the Registry for this application
     app = RegistryManager(app)