mirror of
https://git.nolog.cz/NoLog.cz/headline.git
synced 2025-01-31 11:53:35 +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')
|
||||
|
||||
|
||||
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',
|
||||
|
|
Loading…
Reference in a new issue