fix pagination

This commit is contained in:
mdivecky 2022-08-25 17:24:58 +02:00
parent e5f843f849
commit 0546e3f0b4

View file

@ -41,9 +41,9 @@ def index():
pagination = Pagination(page=page, total=diff_count, record_name='diffs')
page_start = pagination.skip
page_stop = page_start + 10
db.execute("SELECT * FROM diffs ORDER BY diff_id DESC LIMIT ?,?", (page_start,page_stop))
page_skip = pagination.skip
per_page = pagination.per_page
db.execute("SELECT * FROM diffs ORDER BY diff_id DESC LIMIT ? OFFSET ?", (per_page,page_skip))
diffs = db.fetchall()
return render_template('./index.html',