From 08138cf2dde440ce9604c1eb96a7744d156b4647 Mon Sep 17 00:00:00 2001 From: sanj Date: Thu, 29 Jul 2010 01:32:33 +0530 Subject: [PATCH] article_pdf should print something --- edgware/editor/views.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/edgware/editor/views.py b/edgware/editor/views.py index 718f7a8..027559c 100644 --- a/edgware/editor/views.py +++ b/edgware/editor/views.py @@ -584,11 +584,14 @@ def article_pdf(request): height_mm = int(width_mm // article.product.typ.aspect_ratio) pages = Page.objects.filter(article=article) m = article.get_print_multiplier(dpi) - url_list = [] + url = SITE_BASE + "/edit/view_article/%d/?m=%f" % (article.id, m) + url_list = [url] + ''' for p in pages: - url = SITE_BASE + "/edit/view_article/%d/?m=%f&p=%d" % (article.id, m, p.id) + url = SITE_BASE + "/edit/view_article/%d/?m=%f" % (article.id, m) url_list.append(url) - output_path = MEDIA_ROOT + "/pdf/" + article.name + "_" + str(article.current_revision()) + ".pdf".replace(" ", "") + ''' + output_path = MEDIA_ROOT + "/pdf/" + article.name + "_" + str(article.current_revision()) + ".pdf" pdf_path = print_url_list(url_list, width_mm, height_mm, output_path) return HttpResponseRedirect(pdf_path.replace(MEDIA_ROOT, "/static"))