From 712bbcb7b3ac0d711fd77c0844786cd57db7df3a Mon Sep 17 00:00:00 2001 From: Arvind Khadri Date: Fri, 4 Apr 2014 22:51:43 +0530 Subject: [PATCH] After editing a sweet, send a redirect to the same post_id. --- swtr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swtr.py b/swtr.py index 34b099b..36a0d52 100644 --- a/swtr.py +++ b/swtr.py @@ -284,9 +284,9 @@ def show_specific_entry(post_id): for item in request.form: how[item] = request.form[item] try: - g.collection.update({'_id': ObjectId(post_id)}, {"$set":{'how':how}}) - response = make_response() - return response + g.collection.update({'_id': ObjectId(post_id)}, + {"$set": {'how': how}}) + return redirect(url_for('show_specific_entry', post_id=post_id)) except: abort(404) -- 1.7.10.4