Jwt坏了,试图手动完成,但它一直返回假
In [2]: me = User.objects.all()[1]
In [3]: me.password
Out[3]: 'password'
In [4]: me.username
Out[4]: 'cchilders'
In [5]: me.email
Out[5]: 'cchilders'
In [9]: me.check_password('password')
Out[9]: False
答案 0 :(得分:1)
密码应该经过哈希处理,请调用set_password
me.set_password(‘password’)
me.check_password(‘password’)