Commits

g8tam  committed bf9faf6

Changed type(data) == bytes, to isinstance in django.core.basehttp; got rid of a relative import path in django.contrib.comments.forms.

  • Participants
  • Parent commits 1eaaef6

Comments (0)

Files changed (2)

File django/contrib/comments/forms.py

 from django.forms.util import ErrorDict
 from django.conf import settings
 from django.contrib.contenttypes.models import ContentType
-from .models import Comment
+from django.contrib.comments.models import Comment
 from django.utils.encoding import force_unicode
 from django.utils.hashcompat import sha_constructor
 from django.utils.text import get_text_list

File django/core/servers/basehttp.py

     # Pure abstract methods; *must* be overridden in subclasses
 
     def _write(self,data):
-        if type(data) == bytes:
+        if isinstance(data, bytes):
             self.stdout.write(data.decode("utf-8", "replace"))
         else:
             self.stdout.write(data)