Remove Paste#http, Paste#urlmap and Paste#static dependencies.

Changes:

* Paste#http -> Gunicorn
* Paste#urlmap and Paste#static -> werkzeug.wsgi.SharedDataMiddleware
This commit is contained in:
Berker Peksag
2014-06-29 04:23:50 +03:00
parent f9d93c0e9a
commit 19baab1b03
3 changed files with 20 additions and 59 deletions

View File

@@ -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
@@ -277,8 +278,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