fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Translators as authors.
[wolnelektury.git]
/
src
/
catalogue
/
fields.py
diff --git
a/src/catalogue/fields.py
b/src/catalogue/fields.py
index
087fe0d
..
c4dec7e
100644
(file)
--- a/
src/catalogue/fields.py
+++ b/
src/catalogue/fields.py
@@
-251,10
+251,13
@@
class PdfField(EbookField):
@staticmethod
def transform(wldoc, book):
@staticmethod
def transform(wldoc, book):
+ MediaInsertSet = apps.get_model('annoy', 'MediaInsertSet')
return wldoc.as_pdf(
morefloats=settings.LIBRARIAN_PDF_MOREFLOATS,
cover=get_make_cover(book),
return wldoc.as_pdf(
morefloats=settings.LIBRARIAN_PDF_MOREFLOATS,
cover=get_make_cover(book),
- base_url=absolute_url(gallery_url(wldoc.book_info.url.slug)), customizations=['notoc'])
+ base_url=absolute_url(gallery_url(wldoc.book_info.url.slug)), customizations=['notoc'],
+ fundraising=MediaInsertSet.get_texts_for('pdf'),
+ )
def build(self, fieldfile):
super().build(fieldfile)
def build(self, fieldfile):
super().build(fieldfile)
@@
-306,7
+309,7
@@
class HtmlField(EbookField):
book = fieldfile.instance
book = fieldfile.instance
- html_output = self.transform(book.wldocument(parse_dublincore=False))
+ html_output = self.transform(book.wldocument(parse_dublincore=False)
, book
)
# Delete old fragments, create from scratch if necessary.
book.fragments.all().delete()
# Delete old fragments, create from scratch if necessary.
book.fragments.all().delete()