Commit 712bbcb7b3ac0d711fd77c0844786cd57db7df3a
After editing a sweet, send a redirect to the same post_id.
| | | | 284 | for item in request.form: | 284 | for item in request.form: |
---|
285 | how[item] = request.form[item] | 285 | how[item] = request.form[item] |
---|
286 | try: | 286 | try: |
---|
287 | g.collection.update({'_id': ObjectId(post_id)}, {"$set":{'how':how}}) | | g.collection.update({'_id': ObjectId(post_id)}, {"$set":{'how':how}}) |
---|
288 | response = make_response() | | response = make_response() |
---|
289 | return response | | return response |
---|
| | 287 | g.collection.update({'_id': ObjectId(post_id)}, | | | 288 | {"$set": {'how': how}}) |
---|
| | 289 | return redirect(url_for('show_specific_entry', post_id=post_id)) |
---|
290 | except: | 290 | except: |
---|
291 | abort(404) | 291 | abort(404) |
---|
292 | | 292 | |
---|