diff options
| author | chillaranand <anand21nanda@gmail.com> | 2017-01-21 18:43:44 +0530 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-01-25 12:23:46 -0500 |
| commit | d6eaf7c0183cd04b78f2a55e1d60bb7e59598310 (patch) | |
| tree | ab02fd9949d4bfa23e27dea45e213ce334c883f0 /django/template/response.py | |
| parent | dc165ec8e5698ffc6dee6b510f1f92c9fd7467fe (diff) | |
Refs #23919 -- Replaced super(ClassName, self) with super().
Diffstat (limited to 'django/template/response.py')
| -rw-r--r-- | django/template/response.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/django/template/response.py b/django/template/response.py index e5c1fbfa66..4f98875966 100644 --- a/django/template/response.py +++ b/django/template/response.py @@ -33,7 +33,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, charset=charset) + super().__init__('', content_type, status, charset=charset) # _is_rendered tracks whether the template and context has been baked # into a final response. @@ -119,7 +119,7 @@ class SimpleTemplateResponse(HttpResponse): raise ContentNotRenderedError( 'The response content must be rendered before it can be iterated over.' ) - return super(SimpleTemplateResponse, self).__iter__() + return super().__iter__() @property def content(self): @@ -127,7 +127,7 @@ class SimpleTemplateResponse(HttpResponse): raise ContentNotRenderedError( 'The response content must be rendered before it can be accessed.' ) - return super(SimpleTemplateResponse, self).content + return super().content @content.setter def content(self, value): @@ -142,6 +142,5 @@ class TemplateResponse(SimpleTemplateResponse): def __init__(self, request, template, context=None, content_type=None, status=None, charset=None, using=None): - super(TemplateResponse, self).__init__( - template, context, content_type, status, charset, using) + super().__init__(template, context, content_type, status, charset, using) self._request = request |
