X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/abd66021256d14b8d3ac7a09d9673f5c0b7cc174..cf61eb00421c5f6bb1b530e1d499815bc266faac:/catalogue/models.py diff --git a/catalogue/models.py b/catalogue/models.py index d052d67..c684ab5 100644 --- a/catalogue/models.py +++ b/catalogue/models.py @@ -180,6 +180,10 @@ class Lesson(models.Model): if pdf: zipf.write(pdf.path, "%s%s%s.pdf" % (prefix, self.slug, "_student" if student else "")) + for attachment in self.attachment_set.all(): + zipf.write(attachment.file.path, + u"%smaterialy/%s.%s" % (prefix, attachment.slug, attachment.ext)) + def build_package(self, student=False):