aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/util.py')
-rw-r--r--mediagoblin/util.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mediagoblin/util.py b/mediagoblin/util.py
index cc426228..b588fa72 100644
--- a/mediagoblin/util.py
+++ b/mediagoblin/util.py
@@ -138,9 +138,11 @@ def clear_test_template_context():
TEMPLATE_TEST_CONTEXT = {}
-def render_to_response(request, template, context):
+def render_to_response(request, template, context, status=200):
"""Much like Django's shortcut.render()"""
- return Response(render_template(request, template, context))
+ return Response(
+ render_template(request, template, context),
+ status=status)
def redirect(request, *args, **kwargs):