handler.py 文件源码

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

项目:Young 作者: shiyanhui 项目源码 文件源码
def post(self):
        form = StatusCommentsForm(self.request.arguments)
        if not form.validate():
            raise HTTPError(404)

        status_id = form.status_id.data

        status = yield StatusDocument.find_one({
            '_id': ObjectId(status_id)
        })
        if not status:
            raise HTTPError(404)

        status_comment_list = yield StatusCommentDocument.get_comment_list(
            status_id, self.current_user['_id']
        )

        html = self.render_string(
            'home/template/status/status-comment-list.html',
            status=status,
            status_comment_list=status_comment_list
        )

        self.write_json({'html': html})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号