Mercurial > kallithea
diff rhodecode/config/middleware.py @ 635:fd63782c4426 beta
Fixed age, for new vcs implementation. Removed all obsolete date formatters
Added simplegit middleware.
fixed deps
added scm type icon to main page
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 25 Oct 2010 03:19:01 +0200 |
parents | 1e757ac98988 |
children | a9158dfa05cc |
line wrap: on
line diff
--- a/rhodecode/config/middleware.py Sun Oct 24 22:29:35 2010 +0200 +++ b/rhodecode/config/middleware.py Mon Oct 25 03:19:01 2010 +0200 @@ -8,6 +8,7 @@ from pylons.wsgiapp import PylonsApp from routes.middleware import RoutesMiddleware from rhodecode.lib.middleware.simplehg import SimpleHg +from rhodecode.lib.middleware.simplegit import SimpleGit from rhodecode.lib.middleware.https_fixup import HttpsFixup from rhodecode.config.environment import load_environment @@ -35,15 +36,16 @@ # The Pylons WSGI app app = PylonsApp(config=config) - + # Routing/Session/Cache Middleware app = RoutesMiddleware(app, config['routes.map']) app = SessionMiddleware(app, config) - + # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares) - + app = SimpleHg(app, config) - + app = SimpleGit(app, config) + if asbool(full_stack): # Handle Python exceptions app = ErrorHandler(app, global_conf, **config['pylons.errorware']) @@ -54,10 +56,10 @@ app = StatusCodeRedirect(app) else: app = StatusCodeRedirect(app, [400, 401, 403, 404, 500]) - + #enable https redirets based on HTTP_X_URL_SCHEME set by proxy app = HttpsFixup(app) - + # Establish the Registry for this application app = RegistryManager(app) @@ -65,7 +67,7 @@ # Serve static files static_app = StaticURLParser(config['pylons.paths']['static_files']) app = Cascade([static_app, app]) - + app.config = config return app