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",
|
"latest.html",
|
||||||
title="Latest",
|
title="Latest",
|
||||||
quotes=quotes,
|
quotes=quotes,
|
||||||
numpages=1 + allquotes//10,
|
numpages=1 + allquotes//10 if allquotes%10 != 0 else allquotes//10,
|
||||||
curpage=0,
|
curpage=0,
|
||||||
page_type="latest"
|
page_type="latest"
|
||||||
)
|
)
|
||||||
|
@ -99,7 +99,7 @@ def latest_page(page):
|
||||||
"latest.html",
|
"latest.html",
|
||||||
title="Latest - page {}".format(page),
|
title="Latest - page {}".format(page),
|
||||||
quotes=quotes,
|
quotes=quotes,
|
||||||
numpages=1 + allquotes//10,
|
numpages=1 + allquotes//10 if allquotes%10 != 0 else allquotes//10,
|
||||||
curpage=page-1,
|
curpage=page-1,
|
||||||
page_type="latest"
|
page_type="latest"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue