def delete_comment(comment_id=None): question_id = persistence.get_item_by_id('comment', comment_id)[0]["question_id"] persistence.delete_item('comment', comment_id) return redirect('/question/' + str(question_id))
def delete_question(question_id=None): persistence.delete_item('question', question_id) return redirect('/')