Fix
[redakcja.git] / apps / api / handlers / library_handlers.py
index 9d50d02..1cdbe53 100644 (file)
@@ -238,7 +238,6 @@ class DocumentHTMLHandler(BaseHandler):
 #
 # Image Gallery
 #
-from django.core.files.storage import FileSystemStorage
 
 class DocumentGalleryHandler(BaseHandler):
     allowed_methods = ('GET')
@@ -256,7 +255,9 @@ class DocumentGalleryHandler(BaseHandler):
 
             gallery = {'name': assoc.name, 'pages': []}
             
-            for file in sorted(os.listdir(dirpath), key=natural_order()):
+            for file in sorted( os.listdir(dirpath) ):
+                file = file.encode('utf-8')
+                
                 log.info(file)
                 name, ext = os.path.splitext(os.path.basename(file))