page order fixed

This commit is contained in:
Sanj 2011-06-19 17:54:10 +05:30
parent 3fc2d2c4fe
commit b8cbc66e9d
2 changed files with 5 additions and 5 deletions

View File

@ -643,7 +643,7 @@ def article_pdf(request):
dpi = request.GET.get('dpi', 300) dpi = request.GET.get('dpi', 300)
width_mm = request.GET.get('width', article.typ.print_width) width_mm = request.GET.get('width', article.typ.print_width)
height_mm = int(width_mm // article.typ.aspect_ratio) height_mm = int(width_mm // article.typ.aspect_ratio)
pages = Page.objects.filter(article=article) pages = Page.objects.filter(article=article).order_by('page_no')
m = article.get_print_multiplier(dpi) m = article.get_print_multiplier(dpi)
url = SITE_BASE + "/edit/view_article/%d/?m=%f" % (article.id, m) url = SITE_BASE + "/edit/view_article/%d/?m=%f" % (article.id, m)
# url_list = [url] # url_list = [url]

View File

@ -55,13 +55,13 @@ def convertFile(**kwargs):
fname = str(f.file) fname = str(f.file)
ext = e.models.extFileName(fname) ext = e.models.extFileName(fname)
f.ext = ext f.ext = ext
if f.ext in ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG']: if f.ext.lower() in ['jpg', 'jpeg', 'png']:
f.type = 'image' f.type = 'image'
elif f.ext in ['ogg', 'oga']: elif f.ext.lower() in ['ogg', 'oga']:
f.type = 'audio' f.type = 'audio'
elif f.ext in ['ogv']: elif f.ext.lower() in ['ogv']:
f.type = 'video' f.type = 'video'
elif f.ext in ['doc', 'pdf', 'rtf', 'txt']: elif f.ext.lower() in ['doc', 'pdf', 'rtf', 'txt']:
f.type = 'text' f.type = 'text'
else: else:
f.type = 'other' f.type = 'other'