X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/402ff8830378ed95de69201b1f97718fad2eec5d..05b830a33d95f87efcc52650c21947e30df0ffc3:/apps/catalogue/utils.py?ds=sidebyside diff --git a/apps/catalogue/utils.py b/apps/catalogue/utils.py index 07458c9ac..29a1857b0 100644 --- a/apps/catalogue/utils.py +++ b/apps/catalogue/utils.py @@ -55,8 +55,8 @@ class ExistingFile(UploadedFile): pass -class BookImportDocProvider(DocProvider): - """Used for joined EPUB and PDF files.""" +class ORMDocProvider(DocProvider): + """Used for getting books' children.""" def __init__(self, book): self.book = book @@ -90,6 +90,7 @@ class LockFile(object): self.lock.close() +@task def create_zip(paths, zip_slug): """ Creates a zip in MEDIA_ROOT/zip directory containing files from path. @@ -128,8 +129,3 @@ def remove_zip(zip_slug): except OSError as oe: if oe.errno != ENOENT: raise oe - - -@task -def create_zip_task(*args): - return create_zip(*args)