Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

django2.0之后authenticate函数加了个request参数 #25

Closed
Bob-Yuan opened this issue Jan 8, 2020 · 1 comment
Closed

django2.0之后authenticate函数加了个request参数 #25

Bob-Yuan opened this issue Jan 8, 2020 · 1 comment

Comments

@Bob-Yuan
Copy link

Bob-Yuan commented Jan 8, 2020

具体在users/view.py下:
class CustomBackend(ModelBackend):
def authenticate(self, request, username=None, password=None, **kwargs):

改完以后就可以把settings中的30-35行放开注释了

# Application definition 注册我们的app
# 设置邮箱和用户名均可登录
# AUTHENTICATION_BACKENDS = (
#     'users.views.CustomBackend',
#
# )

另:一个小bug是templates\org-list.html页面32行city.id应该是city_id

@mtianyan
Copy link
Owner

非常感谢,确实这几个地方都存在问题,已经一一改正。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants