[Django]-Django All-Auth django.contrib.auth.backends.ModelBackend invalid syntax

5👍

I manage to fix the issue by removing the ‘…’

AUTHENTICATION_BACKENDS = (
    # Needed to login by username in Django admin, regardless of `allauth`
    'django.contrib.auth.backends.ModelBackend',

    # `allauth` specific authentication methods, such as login by e-mail
    'allauth.account.auth_backends.AuthenticationBackend',
)

0👍

If you notice in the AUTHENTICATION_BACKENDS tuple/list there are 3 dots … at the beginning and in the end. Try to remove them it will work fine.
Or simply copy and paste the below snippet :

AUTHENTICATION_BACKENDS = [

    # Needed to login by username in Django admin, regardless of `allauth`
    'django.contrib.auth.backends.ModelBackend',

    # `allauth` specific authentication methods, such as login by e-mail
    'allauth.account.auth_backends.AuthenticationBackend',

]

Leave a comment