pagination fix

This commit is contained in:
Andreas Stephanides
2017-01-21 22:13:07 +01:00
parent 6aba382052
commit 6e3247c66a

View File

@@ -22,11 +22,11 @@ import controller
def index():
v=request.values
if v.has_key("per_page"):
pp=v["per_page"]
pp=int(v["per_page"])
else:
pp=20
if v.has_key(:page):
o=(page-1) *pp
if v.has_key("page"):
o=(int(v["page"])-1) *pp
else:
o=0
articles=controller.get_all_page(pp,o)