diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-09-14 21:30:13 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-09-14 21:30:13 +0000 |
| commit | aff47aa5ed8febc80aacb9e9e723ce5ef9a74066 (patch) | |
| tree | 777cbb45372aedd4b0570bef67859e5f0fcabf09 | |
| parent | e259b8712ad87d1a398d46c593fa81a824041e5d (diff) | |
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
| -rw-r--r-- | django/shortcuts/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/shortcuts/__init__.py b/django/shortcuts/__init__.py index dfb0c28abd..56a2b2634a 100644 --- a/django/shortcuts/__init__.py +++ b/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): |
