From 22fc5efbee965bc5315dacbea23de9c0978c5f89 Mon Sep 17 00:00:00 2001 From: Mikhail Sidorov <7780462+mikhailsidorov@users.noreply.github.com> Date: Mon, 12 Feb 2018 14:38:12 +1200 Subject: [PATCH] Fix wrong pagination urls on index page, issue #85 --- app/main/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main/routes.py b/app/main/routes.py index ea16b77..41d0179 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -38,9 +38,9 @@ def index(): page = request.args.get('page', 1, type=int) posts = current_user.followed_posts().paginate( page, current_app.config['POSTS_PER_PAGE'], False) - next_url = url_for('main.explore', page=posts.next_num) \ + next_url = url_for('main.index', page=posts.next_num) \ if posts.has_next else None - prev_url = url_for('main.explore', page=posts.prev_num) \ + prev_url = url_for('main.index', page=posts.prev_num) \ if posts.has_prev else None return render_template('index.html', title=_('Home'), form=form, posts=posts.items, next_url=next_url,