summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Maliński <riklaunim@gmail.com>2015-04-22 20:31:43 (GMT)
committerPiotr Maliński <riklaunim@gmail.com>2015-04-22 20:31:43 (GMT)
commitc5f531d31f032d097a3fdfc07a2fd7933e0ee136 (patch)
tree4974ab12a0c9b56788379852a1af350c8d3a62eb
parente8b9df963f4b66eff86df8cdb89e6623f5b33f64 (diff)
parent6e8a0cc4d175dd9a4572f1207ef6e5be9e2fdfe5 (diff)
downloaddjango-ckeditor-c5f531d31f032d097a3fdfc07a2fd7933e0ee136.zip
django-ckeditor-c5f531d31f032d097a3fdfc07a2fd7933e0ee136.tar.gz
django-ckeditor-c5f531d31f032d097a3fdfc07a2fd7933e0ee136.tar.bz2
Merge pull request #185 from vstoykov/fix_145
Fixes #145 - Syntax Error on Python 3.2
-rw-r--r--ckeditor/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ckeditor/utils.py b/ckeditor/utils.py
index eb8dff8..c46a40d 100644
--- a/ckeditor/utils.py
+++ b/ckeditor/utils.py
@@ -5,6 +5,7 @@ import string
from django.core.files.storage import default_storage
from django.template.defaultfilters import slugify
+from django.utils.encoding import force_text
class NotAnImageException(Exception):
@@ -32,7 +33,7 @@ def get_thumb_filename(file_name):
Generate thumb filename by adding _thumb to end of
filename before . (if present)
"""
- return unicode('{0}_thumb{1}').format(*os.path.splitext(file_name))
+ return force_text('{0}_thumb{1}').format(*os.path.splitext(file_name))
def get_image_format(extension):