Skip to content

Commit

Permalink
Fixed #1504 -- render_to_response() now takes a mimetype parameter
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Sep 14, 2007
1 parent e259b87 commit aff47aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django/shortcuts/__init__.py
Expand Up @@ -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):
Expand Down

0 comments on commit aff47aa

Please sign in to comment.