From: Jan Szejko Date: Mon, 14 Mar 2016 10:21:11 +0000 (+0100) Subject: changes from server X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/96c3327c8c83e0c814b98216e6c73ca0f01abde6 changes from server --- diff --git a/apps/catalogue/templates/catalogue/base.html b/apps/catalogue/templates/catalogue/base.html index d2af462b..cb2304e8 100644 --- a/apps/catalogue/templates/catalogue/base.html +++ b/apps/catalogue/templates/catalogue/base.html @@ -9,6 +9,7 @@ {% block add_css %}{% endblock %} +
diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index e1dc2a30..5f203808 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -252,7 +252,7 @@ def book_pdf(request, slug): # TODO: move to celery doc = book.wldocument() # TODO: error handling - pdf_file = doc.as_pdf() + pdf_file = doc.as_pdf(cover=True, ilustr_path=os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR, book.gallery)) from catalogue.ebook_utils import serve_file return serve_file(pdf_file.get_filename(), book.slug + '.pdf', 'application/pdf') diff --git a/redakcja/static/js/wiki/xslt.js b/redakcja/static/js/wiki/xslt.js index 618dcd0e..cc71b289 100644 --- a/redakcja/static/js/wiki/xslt.js +++ b/redakcja/static/js/wiki/xslt.js @@ -366,7 +366,7 @@ HTMLSerializer.prototype._serializeElement = function(node) { }; self.result += ' ' + self._join(nsData.prefix, node.getAttribute('x-attr-name-'+this)); - self.result += '="'+node.getAttribute('x-attr-value-'+this) +'"'; + self.result += '="'+node.getAttribute('x-attr-value-'+this).replace(/&/g, '&').replace(/ 1: + for b in range(len(books)): + print "%d) %s" % (b+1, books[b].slug) + print "Which one? " + ch = int(raw_input()) + book = books[ch-1] +else: + book = books[0] + +open(sys.argv[2], "w").write(book.materialize().encode('utf-8')) +