Commit 712bbcb7b3ac0d711fd77c0844786cd57db7df3a

  • avatar
  • arvind
  • Fri Apr 04 22:51:43 IST 2014
After editing a sweet, send a redirect to the same post_id.
swtr.py
(3 / 3)
  
284284 for item in request.form:
285285 how[item] = request.form[item]
286286 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))
290290 except:
291291 abort(404)
292292