如何在Django中检索密码 [英] how to retrieve password in django

查看:57
本文介绍了如何在Django中检索密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何检索用户密码?

How do we retrieve a password of an user?

u = User.objects.get(username__exact=username)
print u.password

显示 sha1 $ f0971 $ 441cac8f604d49869e33ca125a76253a02fef64e

是否存在从该编码字符串中查找密码的功能?

Is there a function to find the password from this encoded string?

推荐答案

否通过设计是不可能的。但是无论如何,永远都不需要这样做。

No. It's impossible, by design. But there should never be a need to do it anyway.

这篇关于如何在Django中检索密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆