fnp
/
edumed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c487ace
)
add option to save html dir (debug html to pdf)
author
Jan Szejko
<janek37@gmail.com>
Thu, 15 Mar 2018 14:43:54 +0000
(15:43 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Thu, 15 Mar 2018 14:43:54 +0000
(15:43 +0100)
catalogue/models.py
patch
|
blob
|
history
diff --git
a/catalogue/models.py
b/catalogue/models.py
index
4a21790
..
7d782ad
100644
(file)
--- 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())))
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()
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=''):
self.weasy_pdf.save("%s.pdf" % self.slug, File(open(pdf.get_filename())))
def add_to_zip(self, zipf, student=False, prefix=''):