handlers.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:python-awesome-web 作者: tianzhenyun 项目源码 文件源码
def api_delete_comments(request, *, comment_id):
    '''delete comment.'''
    check_admin(request)
    comment = yield from Comment.find(comment_id)
    if comment is None:
        raise APIResourceNotFoundError('Comment', 'can not find comment, comment id: {}'.format(comment_id))
    yield from comment.remove()
    return comment
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号