【发布时间】:2014-05-14 07:46:39
【问题描述】:
我对默认的 User 模型做了很少的修改,但是我的登录表单拒绝工作,因为 django 的身份验证一直没有返回。
我已在此处包含所有相关代码(包括错误):https://gist.github.com/ianseyer/9941585
是的,我正在使用 set_password()。
值得注意的是,我正在使用 django-crispy-forms,尽管错误发生在表单之外。
【问题讨论】:
-
试试这个 user.set_password(str(password)); user.save()
标签: python django authentication web