From 460318dfedf9128350ed4246026cf50641acb3d5 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Thu, 15 Mar 2018 15:43:54 +0100 Subject: [PATCH 1/1] add option to save html dir (debug html to pdf) --- catalogue/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalogue/models.py b/catalogue/models.py index 4a21790..7d782ad 100644 --- a/catalogue/models.py +++ b/catalogue/models.py @@ -239,10 +239,10 @@ class Lesson(models.Model): pdf = PdfFormat(wldoc, teacher=True).build() self.pdf.save("%s.pdf" % self.slug, File(open(pdf.get_filename()))) - def build_weasy_pdf(self): + def build_weasy_pdf(self, **kwargs): from .publish import WeasyFormat wldoc = self.wldocument() - pdf = WeasyFormat(wldoc, media_root=settings.MEDIA_ROOT).build() + pdf = WeasyFormat(wldoc, media_root=settings.MEDIA_ROOT, **kwargs).build() self.weasy_pdf.save("%s.pdf" % self.slug, File(open(pdf.get_filename()))) def add_to_zip(self, zipf, student=False, prefix=''): -- 2.20.1