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
311d315a
Commit
311d315a
authored
Oct 08, 2014
by
Xavier Ordoquy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverted
59d0a038
and fixed the tests
parent
b3af4d9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
5 deletions
+1
-5
rest_framework/response.py
+0
-4
tests/test_renderers.py
+1
-1
No files found.
rest_framework/response.py
View file @
311d315a
...
...
@@ -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.
"""
from
__future__
import
unicode_literals
import
django
from
django.core.handlers.wsgi
import
STATUS_CODE_TEXT
from
django.template.response
import
SimpleTemplateResponse
from
django.utils
import
six
...
...
@@ -16,9 +15,6 @@ class Response(SimpleTemplateResponse):
An HttpResponse that allows its data to be rendered into
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
,
template_name
=
None
,
headers
=
None
,
...
...
tests/test_renderers.py
View file @
311d315a
...
...
@@ -643,7 +643,7 @@ class CacheRenderTest(TestCase):
"""
method
=
getattr
(
self
.
client
,
http_method
)
resp
=
method
(
url
)
del
resp
.
client
,
resp
.
request
del
resp
.
client
,
resp
.
request
,
resp
.
_closable_objects
try
:
del
resp
.
wsgi_request
except
AttributeError
:
...
...
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