Django AUTHENTICATION_BACKENDS import error

一个人想着一个人 提交于 2019-12-03 12:28:54

make sure it's a tuple:

AUTHENTICATION_BACKENDS = ('apps.apployment_site.auth.CustomAuth',)

note the comma at the end

I don't think you need to actually import it into your view. According to the documentation, Django will go through all your authentication backends when you call authenticate().

Thus, just make sure you have all the authentication backends you want in your settings.py.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!