handler.py 文件源码

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

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

        profile_cover_id = form.profile_cover_id.data
        profile_cover = yield OfficialProfileCoverDocument.find_one({
            '_id': ObjectId(profile_cover_id)
        })

        if not profile_cover:
            raise HTTPError(404)

        cover = DBRef(
            OfficialProfileCoverDocument.meta['collection'],
            ObjectId(profile_cover['_id'])
        )
        yield UserSettingDocument.set_profile_cover(
            self.current_user['_id'], cover
        )

        raise gen.Return()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号