From 8d6455a61868dde7c5e3ca5082717968b97882ad Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 Aug 2018 20:50:25 +0530 Subject: [PATCH] fixed add new post in main.py and edit.py --- main.py | 2 +- templates/edit.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 925b34a..5dbd952 100644 --- a/main.py +++ b/main.py @@ -134,7 +134,7 @@ def edit(sno): db.session.commit() return redirect('/edit/'+sno) post = Posts.query.filter_by(sno=sno).first() - return render_template('edit.html', params=params, post=post) + return render_template('edit.html', params=params, post=post, sno=sno) @app.route("/uploader", methods = ['GET', 'POST']) diff --git a/templates/edit.html b/templates/edit.html index d8ccc4e..522cc4f 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -28,7 +28,7 @@

Basic Actions

Add/Edit Post

-
+