~fabrixxm/lesanaweb

4dca7fe1f386a895bd785a12dc30c9f3873413dc — fabrixxm 1 year, 1 month ago 721477e
Fix search pagination
1 files changed, 4 insertions(+), 1 deletions(-)

M app.py
M app.py => app.py +4 -1
@@ 45,8 45,11 @@ def search():
    if (page < 1):
        page = 1

    pagestart = (page - 1) * PAGESIZE
    pageend = pagestart + PAGESIZE
    
    collection.start_search(q)
    entries = list(collection.get_search_results(page - 1, PAGESIZE))
    entries = list(collection.get_search_results(pagestart, pageend))
    return render_template('index.html', q=q, page=page, entries=entries, settings=collection.settings)