请问怎么用邮箱验证而不是用户验证?

18 views
Skip to first unread message

Stone

unread,
Dec 26, 2011, 7:29:26 AM12/26/11
to python-cn-free(中文python邮件列表)
请问怎么用邮箱验证而不是用户验证?

机械唯物主义 : linjunhalida

unread,
Dec 26, 2011, 7:36:51 AM12/26/11
to Stone, python-cn-free(中文python邮件列表)
恩, 请把句子说清楚... 验证什么东西?

2011/12/26 Stone <wul...@gmail.com>:
> 请问怎么用邮箱验证而不是用户验证?

Stone

unread,
Dec 26, 2011, 8:52:51 AM12/26/11
to python-cn-free(中文python邮件列表)
网站登录是用邮箱而不是用户名


On 12月26日, 下午8时36分, 机械唯物主义 : linjunhalida <linjunhal...@gmail.com>
wrote:
> 恩, 请把句子说清楚... 验证什么东西?
>
> 2011/12/26 Stone <wule...@gmail.com>:
>
>
>
>
>
>
>
> > 请问怎么用邮箱验证而不是用户验证?

Yesheng Zou

unread,
Dec 26, 2011, 9:52:10 AM12/26/11
to Stone, python-cn-free(中文python邮件列表)


在 2011年12月26日 下午9:52,Stone <wul...@gmail.com>写道:
网站登录是用邮箱而不是用户名


…………

它们又没区别。不都是一串字符串啊。





--
进出自由才是游戏者的生存之道。

http://zys-free.com
@zouyesheng

kenshin

unread,
Dec 27, 2011, 12:34:07 AM12/27/11
to python-cn-free(中文python邮件列表)
def authenticate(email, password):
try:
user = User.objects.get(email=email)
except User.DoesNotExist:
return None
if user.check_password(password):
return user

user = authenticate(email,password)
if user is not None:
login(request, user)

前台登录输入email和password,后台这样来验证。
@stone 是这个意思么?

On Dec 26, 8:29 pm, Stone <wule...@gmail.com> wrote:
> 请问怎么用邮箱验证而不是用户验证?

Reply all
Reply to author
Forward
0 new messages