From a7c641d11ed9d161648dbd4472991d5a5d06afd3 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sat, 20 Aug 2011 15:43:58 -0500 Subject: [PATCH] Allow a user to pass in a status to render_to_response --- mediagoblin/util.py | 6 ++++-- 1 file 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): -- 2.25.1