コード例 #1
0
ファイル: weibo.py プロジェクト: fxyan/Dawn
def delete(request):
    weibo_id = int(request.query['weibo_id'])
    Weibo.delete(weibo_id)
    comments = Comment.all(weibo_id=weibo_id)
    for comment in comments:
        Comment.delete(comment.id)
    return redirect('/weibo')
コード例 #2
0
 def comments(self):
     comments = Comment.all(weibo_id=self.id)
     return comments
コード例 #3
0
ファイル: api_comment.py プロジェクト: AlvinZhn/todo_list
def all():
	comment_list = Comment.all()
	if comment_list is not None:
		comments = Comment.all_json(comment_list)
		return jsonify(comments)