Skip to content

Bugfix for #1850 #2143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 28, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions rest_framework/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
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
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions tests/test_renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ def http_resp(self, http_method, url):
"""
method = getattr(self.client, http_method)
resp = method(url)
resp._closable_objects = []
del resp.client, resp.request
try:
del resp.wsgi_request
Expand Down