Commit 712bbcb7b3ac0d711fd77c0844786cd57db7df3a

  • avatar
  • arvind
  • Fri Apr 04 22:51:43 IST 2014
After editing a sweet, send a redirect to the same post_id.
  • Diff rendering mode:
  • inline
  • side by side

swtr.py

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}})
288 response = make_response()
289 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)
292292