pagination fix
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user