Django AUTHENTICATION_BACKENDS import error

后端 未结 2 1943
慢半拍i
慢半拍i 2021-02-08 04:48

What is the proper way to import a custom backend in settings.py? I currently have the following in settings.py:

AUTHENTICATION_BACKENDS = (\'apps.apployment_sit         


        
2条回答
  •  北荒
    北荒 (楼主)
    2021-02-08 05:39

    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.

提交回复
热议问题