X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/491055ce596b2506c74ca560428814557a4462b8..4fa05f4b9dc3567ab66a7a3a4827ea64b582a4ee:/apps/picture/models.py diff --git a/apps/picture/models.py b/apps/picture/models.py index 3cb1d8973..8aa6f975c 100644 --- a/apps/picture/models.py +++ b/apps/picture/models.py @@ -80,7 +80,7 @@ class Picture(models.Model): """ from sortify import sortify from django.core.files import File - from librarian.picture import WLPicture + from librarian.picture import WLPicture, ImageStore close_xml_file = False close_image_file = False # class SimpleImageStore(object): @@ -98,7 +98,8 @@ class Picture(models.Model): try: # use librarian to parse meta-data - picture_xml = WLPicture.from_file(xml_file) + picture_xml = WLPicture.from_file(xml_file, + image_store=ImageStore(picture_storage.path('images'))) # image_store=SimpleImageStore picture, created = Picture.objects.get_or_create(slug=picture_xml.slug)