comparison rhodecode/config/middleware.py @ 1535:0b8fba8ab90b rhodecode-0.0.1.2.1

fixes for 1.2.1 release
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 08 Oct 2011 16:26:18 +0200
parents bf263968da47
children 752b0a7b7679
comparison
equal deleted inserted replaced
1527:041598fb372e 1535:0b8fba8ab90b
49 # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares) 49 # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)
50 if asbool(config['pdebug']): 50 if asbool(config['pdebug']):
51 from rhodecode.lib.profiler import ProfilingMiddleware 51 from rhodecode.lib.profiler import ProfilingMiddleware
52 app = ProfilingMiddleware(app) 52 app = ProfilingMiddleware(app)
53 53
54 # we want our low level middleware to get to the request ASAP. We don't
55 # need any pylons stack middleware in them
56 app = SimpleHg(app, config)
57 app = SimpleGit(app, config)
58
54 if asbool(full_stack): 59 if asbool(full_stack):
55 # Handle Python exceptions 60 # Handle Python exceptions
56 app = ErrorHandler(app, global_conf, **config['pylons.errorware']) 61 app = ErrorHandler(app, global_conf, **config['pylons.errorware'])
57 62
58 # Display error documents for 401, 403, 404 status codes (and 63 # Display error documents for 401, 403, 404 status codes (and
72 # Serve static files 77 # Serve static files
73 static_app = StaticURLParser(config['pylons.paths']['static_files']) 78 static_app = StaticURLParser(config['pylons.paths']['static_files'])
74 app = Cascade([static_app, app]) 79 app = Cascade([static_app, app])
75 app = make_gzip_middleware(app, global_conf, compress_level=1) 80 app = make_gzip_middleware(app, global_conf, compress_level=1)
76 81
77 # we want our low level middleware to get to the request ASAP. We don't
78 # need any pylons stack middleware in them
79 app = SimpleHg(app, config)
80 app = SimpleGit(app, config)
81
82 app.config = config 82 app.config = config
83 83
84 return app 84 return app