From b49558520ae68fc6c6f26f4bac9715fe58dc4119 Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 21 Jun 2011 02:02:37 +0530 Subject: [PATCH] terrible assumptions --- edgware/editor/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edgware/editor/views.py b/edgware/editor/views.py index 252adac..3644342 100644 --- a/edgware/editor/views.py +++ b/edgware/editor/views.py @@ -627,7 +627,7 @@ def product_pdf(request): width_mm = request.GET['width'] else: width_mm = product.typ.print_width - height_mm = math.ceil(width_mm // product.typ.aspect_ratio) + height_mm = int(width_mm // product.typ.aspect_ratio) pages = product.get_page_list() m = product.get_print_multiplier(dpi) url_list = [] @@ -643,7 +643,7 @@ def article_pdf(request): article = get_object_or_404_json(Article, pk=a_id) dpi = request.GET.get('dpi', 300) width_mm = request.GET.get('width', article.typ.print_width) - height_mm = math.ceil(width_mm // article.typ.aspect_ratio) + height_mm = int(width_mm // article.typ.aspect_ratio) pages = Page.objects.filter(article=article).order_by('page_no') m = article.get_print_multiplier(dpi) url = SITE_BASE + "/edit/view_article/%d/?m=%f" % (article.id, m)