X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/fc0fd8b62d0256e7f253f05bb75c9f42211b7d40..d5ffd31f4dca5ab0144fae542e048934bafa7110:/apps/catalogue/models/book.py?ds=sidebyside diff --git a/apps/catalogue/models/book.py b/apps/catalogue/models/book.py index 5990428d..c8792bbf 100755 --- a/apps/catalogue/models/book.py +++ b/apps/catalogue/models/book.py @@ -419,8 +419,8 @@ class Book(models.Model): changes = self.get_current_changes() data = {"lesson_xml": self.wl1_xml(changes=changes)} if host: - gallery_url = u'%s%s%s%s/' % (host, settings.MEDIA_URL, settings.IMAGE_DIR, self.slug) - gallery_dir = os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR, self.slug) + gallery_url = u'%s%s%s%s/' % (host, settings.MEDIA_URL, settings.IMAGE_DIR, self.gallery) + gallery_dir = os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR, self.gallery) if os.path.isdir(gallery_dir): data['gallery_url'] = gallery_url attachments = os.listdir(gallery_dir)