summaryrefslogtreecommitdiff
path: root/django/template
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2013-06-28 20:50:36 -0300
committerRamiro Morales <cramm0@gmail.com>2013-06-28 21:48:16 -0300
commit8eadbc5a03d06f5bfedfa3fad35ad0801d2ab6ff (patch)
treec9c1639a774a7dae0601dc680fe3c0a4d3648196 /django/template
parent6ba69c8456461aa30f415331b948f7f92dfcf211 (diff)
Removed 'mimetype' arguments from a few places, as per deprecation TL.
This includes HttpResponse and co. __init__() methods, django.shortcuts.render_to_response() and the index(), sitemap() sitemap app views.
Diffstat (limited to 'django/template')
-rw-r--r--django/template/response.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/django/template/response.py b/django/template/response.py
index 3b3b41331a..aa4f12af44 100644
--- a/django/template/response.py
+++ b/django/template/response.py
@@ -10,8 +10,7 @@ class ContentNotRenderedError(Exception):
class SimpleTemplateResponse(HttpResponse):
rendering_attrs = ['template_name', 'context_data', '_post_render_callbacks']
- def __init__(self, template, context=None, content_type=None, status=None,
- mimetype=None):
+ def __init__(self, template, context=None, content_type=None, status=None):
# It would seem obvious to call these next two members 'template' and
# 'context', but those names are reserved as part of the test Client
# API. To avoid the name collision, we use tricky-to-debug problems
@@ -23,8 +22,7 @@ class SimpleTemplateResponse(HttpResponse):
# content argument doesn't make sense here because it will be replaced
# with rendered template so we always pass empty string in order to
# prevent errors and provide shorter signature.
- super(SimpleTemplateResponse, self).__init__('', content_type, status,
- mimetype)
+ super(SimpleTemplateResponse, self).__init__('', content_type, status)
# _is_rendered tracks whether the template and context has been baked
# into a final response.
@@ -139,7 +137,7 @@ class TemplateResponse(SimpleTemplateResponse):
['_request', '_current_app']
def __init__(self, request, template, context=None, content_type=None,
- status=None, mimetype=None, current_app=None):
+ status=None, current_app=None):
# self.request gets over-written by django.test.client.Client - and
# unlike context_data and template_name the _request should not
# be considered part of the public API.
@@ -148,7 +146,7 @@ class TemplateResponse(SimpleTemplateResponse):
# having to avoid needing to create the RequestContext directly
self._current_app = current_app
super(TemplateResponse, self).__init__(
- template, context, content_type, status, mimetype)
+ template, context, content_type, status)
def resolve_context(self, context):
"""Convert context data into a full RequestContext object