X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/4daa3475da9a4d4de4488ec742c77248641e8c1e..888f954ea4d9b923e963525dbdf83d9ad1f9b443:/apps/api/handlers/library_handlers.py diff --git a/apps/api/handlers/library_handlers.py b/apps/api/handlers/library_handlers.py index 84881cee..0f5b6d64 100644 --- a/apps/api/handlers/library_handlers.py +++ b/apps/api/handlers/library_handlers.py @@ -60,8 +60,7 @@ class LibraryHandler(BaseHandler): documents = {} - for docid in lib.documents(): - docid = docid.decode('utf-8') + for docid in lib.documents(): documents[docid] = { 'url': reverse('document_view', args=[docid]), 'name': docid, @@ -255,7 +254,9 @@ class DocumentGalleryHandler(BaseHandler): gallery = {'name': assoc.name, 'pages': []} - for file in sorted(os.listdir(dirpath)): + for file in sorted( os.listdir(dirpath) ): + file = file.encode('utf-8') + log.info(file) name, ext = os.path.splitext(os.path.basename(file))