mirror of
https://git.nolog.cz/NoLog.cz/headline.git
synced 2025-02-07 14:12:45 +01:00
fix pagination
This commit is contained in:
parent
e5f843f849
commit
0546e3f0b4
1 changed files with 4 additions and 4 deletions
|
@ -41,9 +41,9 @@ def index():
|
||||||
pagination = Pagination(page=page, total=diff_count, record_name='diffs')
|
pagination = Pagination(page=page, total=diff_count, record_name='diffs')
|
||||||
|
|
||||||
|
|
||||||
page_start = pagination.skip
|
page_skip = pagination.skip
|
||||||
page_stop = page_start + 10
|
per_page = pagination.per_page
|
||||||
db.execute("SELECT * FROM diffs ORDER BY diff_id DESC LIMIT ?,?", (page_start,page_stop))
|
db.execute("SELECT * FROM diffs ORDER BY diff_id DESC LIMIT ? OFFSET ?", (per_page,page_skip))
|
||||||
diffs = db.fetchall()
|
diffs = db.fetchall()
|
||||||
|
|
||||||
return render_template('./index.html',
|
return render_template('./index.html',
|
||||||
|
|
Loading…
Add table
Reference in a new issue