handler.py 文件源码

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

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

        email_notify_when_offline = form.email_notify_when_offline.data

        yield UserSettingDocument.update(
            {'user': DBRef(
                UserDocument.meta['collection'],
                ObjectId(self.current_user['_id'])
            )},
            {'$set': {'email_notify_when_offline': email_notify_when_offline}}
        )

        self.finish()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号