aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/app.py')
-rw-r--r--mediagoblin/app.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mediagoblin/app.py b/mediagoblin/app.py
index 6923e198..b3e41835 100644
--- a/mediagoblin/app.py
+++ b/mediagoblin/app.py
@@ -23,6 +23,7 @@ from mediagoblin.tools.routing import endpoint_to_controller
from werkzeug.wrappers import Request
from werkzeug.exceptions import HTTPException
from werkzeug.routing import RequestRedirect
+from werkzeug.wsgi import SharedDataMiddleware
from mediagoblin import meddleware, __version__
from mediagoblin.db.util import check_db_up_to_date
@@ -93,7 +94,9 @@ class MediaGoblinApp(object):
self.db = setup_database(app_config['run_migrations'])
# Quit app if need to run dbupdate
- check_db_up_to_date()
+ ## NOTE: This is currently commented out due to session errors..
+ ## We'd like to re-enable!
+ # check_db_up_to_date()
# Register themes
self.theme_registry, self.current_theme = register_themes(app_config)
@@ -279,8 +282,11 @@ def paste_app_factory(global_config, **app_config):
if not mediagoblin_config:
raise IOError("Usable mediagoblin config not found.")
+ del app_config['config']
mgoblin_app = MediaGoblinApp(mediagoblin_config)
+ mgoblin_app.call_backend = SharedDataMiddleware(mgoblin_app.call_backend,
+ exports=app_config)
mgoblin_app = hook_transform('wrap_wsgi', mgoblin_app)
return mgoblin_app