models.py 文件源码

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

项目:nrp 作者: django-rea 项目源码 文件源码
def change(self, new_email, confirm=True):
        """
        Given a new email address, change self and re-confirm.
        """
        #with transaction.commit_on_success():
        #todo: no longer exists as of django 1.6
        #commented out for now
        #fix later, see https://docs.djangoproject.com/en/1.8/topics/db/transactions/
        self.user.email = new_email
        self.user.save()
        self.email = new_email
        self.verified = False
        self.save()
        if confirm:
            self.send_confirmation()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号