File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 5
5
The appropriate renderer is called during Django's template response rendering.
6
6
"""
7
7
from __future__ import unicode_literals
8
+ import django
8
9
from django .core .handlers .wsgi import STATUS_CODE_TEXT
9
10
from django .template .response import SimpleTemplateResponse
10
11
from rest_framework .compat import six
@@ -15,7 +16,9 @@ class Response(SimpleTemplateResponse):
15
16
An HttpResponse that allows its data to be rendered into
16
17
arbitrary media types.
17
18
"""
18
- rendering_attrs = SimpleTemplateResponse .rendering_attrs + ['_closable_objects' ]
19
+ # TODO: remove that once Django 1.3 isn't supported
20
+ if django .VERSION > (1 , 3 ):
21
+ rendering_attrs = SimpleTemplateResponse .rendering_attrs + ['_closable_objects' ]
19
22
20
23
def __init__ (self , data = None , status = 200 ,
21
24
template_name = None , headers = None ,
You can’t perform that action at this time.
0 commit comments