Mercurial > public > src > rhodecode
comparison 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 |
comparison
equal
deleted
inserted
replaced
85:4bb06ccb5bee | 86:e47d1db5ef20 |
---|---|
49 app = ErrorHandler(app, global_conf, **config['pylons.errorware']) | 49 app = ErrorHandler(app, global_conf, **config['pylons.errorware']) |
50 | 50 |
51 # Display error documents for 401, 403, 404 status codes (and | 51 # Display error documents for 401, 403, 404 status codes (and |
52 # 500 when debug is disabled) | 52 # 500 when debug is disabled) |
53 if asbool(config['debug']): | 53 if asbool(config['debug']): |
54 #don't handle 404, since mercurial does it for us. | 54 app = StatusCodeRedirect(app) |
55 app = StatusCodeRedirect(app, [400, 401, 403]) | |
56 else: | 55 else: |
57 app = StatusCodeRedirect(app, [400, 401, 403, 500]) | 56 app = StatusCodeRedirect(app, [400, 401, 403, 404, 500]) |
58 | 57 |
59 # Establish the Registry for this application | 58 # Establish the Registry for this application |
60 app = RegistryManager(app) | 59 app = RegistryManager(app) |
61 | 60 |
62 if asbool(static_files): | 61 if asbool(static_files): |