fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb08157
)
Patch to handle unicode image names.
author
Łukasz Rekucki
<lrekucki@gmail.com>
Tue, 8 Sep 2009 11:08:18 +0000
(13:08 +0200)
committer
Łukasz Rekucki
<lrekucki@gmail.com>
Tue, 8 Sep 2009 11:08:18 +0000
(13:08 +0200)
apps/explorer/models.py
patch
|
blob
|
history
diff --git
a/apps/explorer/models.py
b/apps/explorer/models.py
index
5fc31e7
..
f292283
100644
(file)
--- 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('.'))