Commits

Kristian Bendiksen committed fddaa45

Add second part of django 1.4 fix.

  • Participants
  • Parent commits fcbad1f

Comments (0)

Files changed (1)

 import time
+
+import django
 from django.http import HttpResponseNotAllowed, HttpResponseForbidden, HttpResponse, HttpResponseBadRequest
 from django.core.urlresolvers import reverse
 from django.core.cache import cache
                 HttpResponse.content although this bug report (feature request)
                 suggests that it should: http://code.djangoproject.com/ticket/9403 
                 """
+                is_string = False
                 if not isinstance(content, basestring) and hasattr(content, '__iter__'):
                     self._container = content
                     self._is_string = False
                     self._base_content_iter = True
                 else:
                     self._container = [content]
-                    self._is_string = True
+                    is_string = True
                     self._base_content_iter = False
 
+                if django.VERSION >= (1, 4):
+                    self._base_content_is_iter = not is_string
+                else:
+                    self._is_string = is_string
+
+
+
             content = property(HttpResponse._get_content, _set_content)            
 
         return HttpResponseWrapper(r, content_type='text/plain', status=c)