X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/e01dee1eda68946acf73e43f2c54b3c730514a21..007edbf0d879c5aff6a883c64e51955ad1645303:/apps/catalogue/views.py?ds=sidebyside diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 87236855..3c0e70ff 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -257,7 +257,7 @@ def book_pdf(request, slug): try: pdf_file = NamedTemporaryFile(delete=False) - pdf.transform(RedakcjaDocProvider(), + pdf.transform(RedakcjaDocProvider(publishable=True), file_path=xml_file.name, output_file=pdf_file, ) @@ -283,7 +283,8 @@ def book_epub(request, slug): xml_file.flush() epub_file = StringIO() - epub.transform(RedakcjaDocProvider(), file_path=xml_file.name, + epub.transform(RedakcjaDocProvider(publishable=True), + file_path=xml_file.name, output_file=epub_file) response = HttpResponse(mimetype='application/epub+zip') response['Content-Disposition'] = 'attachment; filename=%s' % book.slug + '.epub'