From 52666d1a087e978f58b9867558bf3fcbfdf04eee Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Rekucki?= Date: Tue, 8 Sep 2009 13:08:18 +0200 Subject: [PATCH] Patch to handle unicode image names. --- apps/explorer/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/explorer/models.py b/apps/explorer/models.py index 5fc31e7e..f292283f 100644 --- a/apps/explorer/models.py +++ b/apps/explorer/models.py @@ -48,7 +48,7 @@ def get_image_folders(): def get_images_from_folder(folder): - return sorted(settings.MEDIA_URL + settings.IMAGE_DIR + '/' + folder + '/' + fn for fn + return sorted(settings.MEDIA_URL + settings.IMAGE_DIR + u'/' + folder + u'/' + fn.decode('utf-8') for fn in os.listdir(os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR, folder)) - if not fn.startswith('.')) + if not fn.decode('utf-8').startswith('.')) -- 2.20.1