我们从Python开源项目中,提取了以下44个代码示例,用于说明如何使用django.contrib.auth.password_validation.password_changed()。
def __init__(self, *args, **kwargs): super(AbstractBaseUser, self).__init__(*args, **kwargs) # Stores the raw password if set_password() is called so that it can # be passed to password_changed() after the model is saved. self._password = None
def save(self, *args, **kwargs): super(AbstractBaseUser, self).save(*args, **kwargs) if self._password is not None: password_validation.password_changed(self._password, self) self._password = None