From 5eaab761b37f6e880ccc6e743675d7e2ad59c1e4 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 10 Jun 2021 00:20:09 +0000 Subject: delete post template, fuzziness for timestamps etc --- apioforum/thread.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apioforum/thread.py') diff --git a/apioforum/thread.py b/apioforum/thread.py index d64055a..b9697ce 100644 --- a/apioforum/thread.py +++ b/apioforum/thread.py @@ -96,7 +96,8 @@ def edit_post(post_id): print(err) if err is None: print("a") - db.execute("UPDATE posts SET content = ? WHERE id = ?",(newcontent,post_id)) + db.execute( + "UPDATE posts SET content = ?, edited = 1, updated = current_timestamp WHERE id = ?",(newcontent,post_id)) db.commit() flash("post edited editiously") return redirect(url_for("thread.view_thread",thread_id=post['thread'])) -- cgit v1.2.3