Modified files
pyproject.toml
---
+++
@@ -8,6 +8,7 @@
[tool.poetry.dependencies]
python = "^3.12"
django = "^5.1.3"
+django-allauth = {extras = ["socialaccount"], version = "^65.2.0"}
[tool.poetry.group.dev.dependencies]
djangocourse/settings.py
---
+++
@@ -27,11 +27,14 @@
ALLOWED_HOSTS = []
+AUTHENTICATION_BACKENDS = [
+ "allauth.account.auth_backends.AuthenticationBackend"
+]
+
# Application definition
-INSTALLED_APPS = [
- "app.apps.AppConfig",
+DJANGO_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
@@ -39,6 +42,17 @@
'django.contrib.messages',
'django.contrib.staticfiles',
]
+
+THIRD_PARTY_APPS = [
+ "allauth",
+ "allauth.account",
+]
+
+PROJECT_APPS = [
+ "app.apps.AppConfig",
+]
+
+INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + PROJECT_APPS
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
@@ -48,6 +62,7 @@
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
+ "allauth.account.middleware.AccountMiddleware",
]
if DEBUG: