diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-12-22 04:54:10 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-12-22 04:54:10 +0000 |
| commit | 0fef92f6f0d064cdce4e8722fd9fe27ed451bb9b (patch) | |
| tree | 047694c33e157657cc1e300aa093ba91fbee541c /django | |
| parent | 6e75ee2b3289b7d7e8192c62d665cd08d3819360 (diff) | |
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
Diffstat (limited to 'django')
| -rw-r--r-- | django/shortcuts/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
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) |
