mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Reverted 59d0a0387d
and fixed the tests
This commit is contained in:
parent
b3af4d9fe7
commit
311d315a73
|
@ -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,
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user