From 0fef92f6f0d064cdce4e8722fd9fe27ed451bb9b Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 22 Dec 2010 04:54:10 +0000 Subject: Fixed #14936 -- Tweaked the new render shortcut to reflect non-legacy arguments. Thanks to adamv for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15020 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/shortcuts/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'django') diff --git a/django/shortcuts/__init__.py b/django/shortcuts/__init__.py index 00e97b1107..b7d69b5b0c 100644 --- a/django/shortcuts/__init__.py +++ b/django/shortcuts/__init__.py @@ -25,7 +25,10 @@ def render(request, *args, **kwargs): django.template.loader.render_to_string() with the passed arguments. Uses a RequestContext by default. """ - httpresponse_kwargs = {'mimetype': kwargs.pop('mimetype', None)} + httpresponse_kwargs = { + 'content_type': kwargs.pop('content_type', None), + 'status': kwargs.pop('status', None), + } kwargs['context_instance'] = kwargs.get('context_instance', RequestContext(request)) return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs) -- cgit v1.3