Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
8d989bb1
Commit
8d989bb1
authored
Nov 28, 2014
by
Tom Christie
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2143 from linovia/bugfix/1850
Bugfix for #1850
parents
9ba29a88
76741443
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
4 deletions
+1
-4
rest_framework/response.py
+0
-4
tests/test_renderers.py
+1
-0
No files found.
rest_framework/response.py
View file @
8d989bb1
...
@@ -5,7 +5,6 @@ it is initialized with unrendered data, instead of a pre-rendered string.
...
@@ -5,7 +5,6 @@ it is initialized with unrendered data, instead of a pre-rendered string.
The appropriate renderer is called during Django's template response rendering.
The appropriate renderer is called during Django's template response rendering.
"""
"""
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
import
django
from
django.core.handlers.wsgi
import
STATUS_CODE_TEXT
from
django.core.handlers.wsgi
import
STATUS_CODE_TEXT
from
django.template.response
import
SimpleTemplateResponse
from
django.template.response
import
SimpleTemplateResponse
from
django.utils
import
six
from
django.utils
import
six
...
@@ -16,9 +15,6 @@ class Response(SimpleTemplateResponse):
...
@@ -16,9 +15,6 @@ class Response(SimpleTemplateResponse):
An HttpResponse that allows its data to be rendered into
An HttpResponse that allows its data to be rendered into
arbitrary media types.
arbitrary media types.
"""
"""
# TODO: remove that once Django 1.3 isn't supported
if
django
.
VERSION
>=
(
1
,
4
):
rendering_attrs
=
SimpleTemplateResponse
.
rendering_attrs
+
[
'_closable_objects'
]
def
__init__
(
self
,
data
=
None
,
status
=
None
,
def
__init__
(
self
,
data
=
None
,
status
=
None
,
template_name
=
None
,
headers
=
None
,
template_name
=
None
,
headers
=
None
,
...
...
tests/test_renderers.py
View file @
8d989bb1
...
@@ -646,6 +646,7 @@ class CacheRenderTest(TestCase):
...
@@ -646,6 +646,7 @@ class CacheRenderTest(TestCase):
"""
"""
method
=
getattr
(
self
.
client
,
http_method
)
method
=
getattr
(
self
.
client
,
http_method
)
resp
=
method
(
url
)
resp
=
method
(
url
)
resp
.
_closable_objects
=
[]
del
resp
.
client
,
resp
.
request
del
resp
.
client
,
resp
.
request
try
:
try
:
del
resp
.
wsgi_request
del
resp
.
wsgi_request
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment