From fdfb10614189da678c8c4993b7b50e8ac94e4f1e Mon Sep 17 00:00:00 2001 From: pluja Date: Thu, 1 Oct 2020 10:11:49 +0200 Subject: [PATCH] Adds showing actual page --- app/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routes.py b/app/routes.py index 356374f..c521dde 100644 --- a/app/routes.py +++ b/app/routes.py @@ -81,7 +81,7 @@ def twitter(page=0): if init_page < 0: init_page = 0 print(init_page) - + total_pages = page+5 max_pages = int(math.ceil(len(posts)/10)) # Total number of pages. if total_pages > max_pages: @@ -98,7 +98,7 @@ def twitter(page=0): else: profilePic = posts[0].userProfilePic print("--- {} seconds fetching twitter feed---".format(time.time() - start_time)) - return render_template('twitter.html', title='Yotter | Twitter', posts=posts, avatar=avatarPath, profilePic = profilePic, followedCount=followCount, form=form, config=config, pages=total_pages, init_page=init_page) + return render_template('twitter.html', title='Yotter | Twitter', posts=posts, avatar=avatarPath, profilePic = profilePic, followedCount=followCount, form=form, config=config, pages=total_pages, init_page=init_page, actual_page=page) @app.route('/savePost/', methods=['POST']) @login_required