【发布时间】:2013-09-10 20:48:51
【问题描述】:
我有以下代码sn-p:
user = User(username='h@h.com',email='h@h.com')
user.set_password('pass')
user.save()
u = authenticate(username='h@h.com', password='pass') #this always returns None!!!
问题是,你总是无。我已经关注了其他堆栈溢出帖子上的代码示例,并将其范围缩小到上述几行。
对可能发生的事情有任何想法吗?
【问题讨论】:
-
你有一些自定义设置吗?
标签: django authentication nonetype