示例#1
0
文件: models.py 项目: chuckSMASH/risk
 def verify_password(self, candidate):
     try:
         return Context.verify(candidate, self.password)
     except (ValueError, TypeError):
         return False
示例#2
0
文件: models.py 项目: chuckSMASH/risk
 def set_password(self, new_password):
     self.password = Context.encrypt(new_password)