Merge pull request #168 from karec/master

fix a bug for unicode string in utils.py for python3.2 support (current ...
This commit is contained in:
riklaunim 2015-02-07 11:44:34 +01:00
commit 7c57801abd
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ def get_slugified_name(filename):
def get_random_string():
return ''.join(random.sample(string.ascii_lowercase*6, 6))
return ''.join(random.sample(string.ascii_lowercase * 6, 6))
def get_thumb_filename(file_name):
@ -32,7 +32,7 @@ def get_thumb_filename(file_name):
Generate thumb filename by adding _thumb to end of
filename before . (if present)
"""
return u'{0}_thumb{1}'.format(*os.path.splitext(file_name))
return unicode('{0}_thumb{1}').format(*os.path.splitext(file_name))
def get_image_format(extension):