I can’t login to admin page. After I delete this below statement in setting.py , I can log in as usual.
AUTHENTICATION_BACKENDS = (
‘chula.models.MyCustomBackend’,
)
this is the source that this authen backend come from
http://www.djangorocks.com/tutorials/creating-a-custom-authentication-backend/creating-the-imap-authentication-backend.html
I want to use both this authen bakend and admin page. Can anyone help me ?
AUTHENTICATION_BACKENDSshould contain all the authentication backends to use.So if you want to use the default backend as well as the custom one you should specify both of them:
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'chula.models.MyCustomBackend', )See the documentation on Specifying authentication backends for more details.