def delete(): weibo_id = int(request.args.get('id')) w = Weibo.remove(weibo_id) comments = Comment.find_all(weibo_id=weibo_id) for comment in comments: Comment.remove(comment.id) return jsonify(w.json())
def delete(): comment_id = int(request.args.get('id')) c = Comment.remove(comment_id) return jsonify(c.json())