aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/compat.py
diff options
context:
space:
mode:
authorTom Christie2013-06-21 22:42:04 +0100
committerTom Christie2013-06-21 22:42:04 +0100
commit8cc63b09f6065e0197e060cc4d62b560196c8877 (patch)
tree3b8827f179369dbe07cd29a0ba4897328ee7d922 /rest_framework/compat.py
parent4f7f93e20ef53fbc0b66766158bca75ebddce2ed (diff)
downloaddjango-rest-framework-8cc63b09f6065e0197e060cc4d62b560196c8877.tar.bz2
Add support for StreamingHttpResponse. Closes #939
Diffstat (limited to 'rest_framework/compat.py')
-rw-r--r--rest_framework/compat.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index 76dc0052..a19bd778 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -33,6 +33,12 @@ except ImportError:
from django.utils.encoding import force_unicode as force_text
+# HttpResponseBase only exists from 1.5 onwards
+try:
+ from django.http.response import HttpResponseBase
+except ImportError:
+ from django.http import HttpResponse as HttpResponseBase
+
# django-filter is optional
try:
import django_filters