py3 doesn't have smart_unicode, but py2.7 does. this fixes py3.4 use #9

Merged
merged 1 commit into from Oct 20, 2015
Jump to file or symbol
Failed to load files and symbols.
+6 −1
Diff settings

Always

Just for now

py3 doesn't have smart_unicode, but py2.7 does. this fixes py3.4 use

  • Loading branch information...
kckrinke committed Oct 20, 2015
commit f57ebf830692131466bebbe31f19dee8db976784
View
@@ -1,6 +1,11 @@
from django.conf import settings
from django.db import models
-from django.utils.encoding import smart_unicode
+
+import sys
+if sys.version_info[0] == 3:
+ from django.utils.encoding import smart_text as smart_unicode
+else:
+ from django.utils.encoding import smart_unicode
import bleach