From 6fd6ea8d79c89bac4bac3bb94dfa166d2401872f Mon Sep 17 00:00:00 2001 From: JayKayAce Date: Tue, 16 Jul 2019 17:30:43 +0200 Subject: [PATCH] added "explore" route --- app/routes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/routes.py b/app/routes.py index 14c0f1d..c0576ef 100644 --- a/app/routes.py +++ b/app/routes.py @@ -135,4 +135,7 @@ def unfollow(username): return redirect(url_for("user", username = username)) @app.route("/explore") -@login_required \ No newline at end of file +@login_required +def explore(): + posts = Post.query.order_by(Post.timestamp.desc()).all() + return render_template("index.html",title="Explore", posts=posts) \ No newline at end of file