Fixed bug where an extra blank page would show on "latest" if number of quotes was divisible by 10
This commit is contained in:
parent
2b17a55968
commit
c29ad49dbb
1 changed files with 10 additions and 10 deletions
|
@ -79,7 +79,7 @@ def latest():
|
|||
"latest.html",
|
||||
title="Latest",
|
||||
quotes=quotes,
|
||||
numpages=1 + allquotes//10,
|
||||
numpages=1 + allquotes//10 if allquotes%10 != 0 else allquotes//10,
|
||||
curpage=0,
|
||||
page_type="latest"
|
||||
)
|
||||
|
@ -95,15 +95,15 @@ def latest_page(page):
|
|||
for quote in quotes:
|
||||
quote.content = str(Markup.escape(quote.content)).replace('\n', '</br>')
|
||||
|
||||
return render_template(
|
||||
"latest.html",
|
||||
title="Latest - page {}".format(page),
|
||||
quotes=quotes,
|
||||
numpages=1 + allquotes//10,
|
||||
curpage=page-1,
|
||||
page_type="latest"
|
||||
)
|
||||
|
||||
return render_template(
|
||||
"latest.html",
|
||||
title="Latest - page {}".format(page),
|
||||
quotes=quotes,
|
||||
numpages=1 + allquotes//10 if allquotes%10 != 0 else allquotes//10,
|
||||
curpage=page-1,
|
||||
page_type="latest"
|
||||
)
|
||||
|
||||
@app.route('/queue')
|
||||
def queue():
|
||||
if not session.get('authorized'):
|
||||
|
|
Loading…
Add table
Reference in a new issue