Django-allauth Cannot login

I created a login form with Django-allauth.

But I can't login properly.

I think my email address and password are correct.

Is there a problem with the LOGIN_REDIRECT_URL?

How can I log in?

settings.py

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'widget_tweaks',
    'app',
    'accounts',
    'django.contrib.sites',
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
]

、、、、、、、、、、、、、、、、、

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.1/howto/static-files/

STATIC_URL = 'static/'

# Default primary key field type
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'


SITE_ID = 1
LOGIN_REDIRECT_URL = '/'
ACCOUNT_LOGOUT_REDIRECT_URL = '/'
ACCOUNT_EMAIL_VERIFICATION = 'none'


AUTH_USER_MODEL = 'accounts.CustomUser'
ACCOUNT_AUTHENTICATION_EMAIL = 'email'
ACCOUNT_USER_MODEL_USERNAME_FIELD = None
ACCOUNT_EMAIl_REQUIRED = True
ACCOUNT_USERNAME_REQUIRED = False

mysite/urls.py

from django.urls import path, include

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('app.urls')),
    path('accouts/', include('accounts.urls')),
    path('accouts/', include('allauth.urls')),

]
Back to Top