fix 邮件修改密码 token错误

pull/458/head
倪建强 2017-05-26 11:23:16 +08:00
parent b36b702705
commit 3c8aec941b
1 changed files with 1 additions and 1 deletions

View File

@ -189,7 +189,7 @@ class User(AbstractUser):
return 'https://www.gravatar.com/avatar/c6812ab450230979465d7bf288eadce2a?s=120&d=identicon'
def generate_reset_token(self):
return signer.sign_t({'reset': self.id, 'email': self.email}, expires_in=3600)
return signer.sign_t({'reset': self.id, 'email': self.email}, expires_in=3600).decode('utf-8'
def to_json(self):
return OrderedDict({