Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #1504 -- render_to_response() now takes a mimetype parameter

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit aff47aa5ed8febc80aacb9e9e723ce5ef9a74066 1 parent e259b87
Adrian Holovaty authored September 14, 2007

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  django/shortcuts/__init__.py
3  django/shortcuts/__init__.py
@@ -14,7 +14,8 @@ def render_to_response(*args, **kwargs):
14 14
     Returns a HttpResponse whose content is filled with the result of calling
15 15
     django.template.loader.render_to_string() with the passed arguments.
16 16
     """
17  
-    return HttpResponse(loader.render_to_string(*args, **kwargs))
  17
+    httpresponse_kwargs = {'mimetype': kwargs.pop('mimetype')}
  18
+    return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
18 19
 load_and_render = render_to_response # For backwards compatibility.
19 20
 
20 21
 def _get_queryset(klass):

0 notes on commit aff47aa

Please sign in to comment.
Something went wrong with that request. Please try again.