models.py 文件源码

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

项目:do-portal 作者: certeu 项目源码 文件源码
def generate_reset_token(self, expiry=900):
        """Generate a JSON Web Signature that will be used to reset customer's
        password. For details see
        :meth:`itsdangerous.JSONWebSignatureSerializer.dumps`

        :param expiry: Token expiration time (seconds)
        :return:
        """
        s = TimedJSONWebSignatureSerializer(
            current_app.config['SECRET_KEY'], expiry
        )
        return s.dumps({'user_id': self.id})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号