aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/app.py
diff options
context:
space:
mode:
authorSebastian Spaeth <Sebastian@SSpaeth.de>2012-11-16 10:25:50 +0100
committerSebastian Spaeth <Sebastian@SSpaeth.de>2012-12-21 08:10:48 +0100
commitb745bb50d8a4c92b5adbbd6918262ff8c9cc9609 (patch)
treeb1ff24fa3bd475d3bd327aa77da768ac8cb87dd4 /mediagoblin/app.py
parent4487d51c819dcf34d335dd9efc57d03cf7c7ed1e (diff)
downloadmediagoblin-b745bb50d8a4c92b5adbbd6918262ff8c9cc9609.tar.lz
mediagoblin-b745bb50d8a4c92b5adbbd6918262ff8c9cc9609.tar.xz
mediagoblin-b745bb50d8a4c92b5adbbd6918262ff8c9cc9609.zip
Remove webob from render_to_response
We were still using webob's Response objects for template rendering. Transition to werkzeug's Response object. One caveat was that it seemed to have used the default mimetype "text/plain" for all pages, so we override the default Response class, setting the default mime type to "text/html". Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'mediagoblin/app.py')
-rw-r--r--mediagoblin/app.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mediagoblin/app.py b/mediagoblin/app.py
index 876ded4e..8bd2496f 100644
--- a/mediagoblin/app.py
+++ b/mediagoblin/app.py
@@ -193,7 +193,8 @@ class MediaGoblinApp(object):
except NotFound as exc:
return render_404(request)(environ, start_response)
except HTTPException as exc:
- # Support legacy webob.exc responses
+ # exceptions that match() is documented to return:
+ # MethodNotAllowed, RequestRedirect TODO: need to handle ???
return exc(environ, start_response)
view_func = view_functions[endpoint]