Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/shortcuts/__init__.py
View
3  django/shortcuts/__init__.py
@@ -14,7 +14,8 @@ def render_to_response(*args, **kwargs):
Returns a HttpResponse whose content is filled with the result of calling
django.template.loader.render_to_string() with the passed arguments.
"""
- return HttpResponse(loader.render_to_string(*args, **kwargs))
+ httpresponse_kwargs = {'mimetype': kwargs.pop('mimetype')}
+ return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
load_and_render = render_to_response # For backwards compatibility.
def _get_queryset(klass):
Please sign in to comment.
Something went wrong with that request. Please try again.