Пример #1
0
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())
Пример #2
0
 def comments(self):
     return Comment.find_all(weibo_id=self.id)