From d7e74f2932791faab47b4c0abe5281767dc4a516 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Thu, 17 Sep 2020 10:43:08 -0700 Subject: [PATCH] fix pagination bug - don't round the result --- suchwow/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suchwow/app.py b/suchwow/app.py index 90e8398..430dc0c 100644 --- a/suchwow/app.py +++ b/suchwow/app.py @@ -32,7 +32,7 @@ def index(): page = 1 posts = Post.select().order_by(Post.timestamp.desc()).paginate(page, itp) - total_pages = round(Post.select().count() / itp) + total_pages = Post.select().count() / itp return render_template("index.html", posts=posts, page=page, total_pages=total_pages) @app.route("/about")