This commit is contained in:
2024-07-01 05:56:36 +02:00
parent 3f7bacca2f
commit 219aee31af
30 changed files with 679 additions and 263 deletions

View File

@ -63,7 +63,7 @@ DISCORD_WEBHOOK_URL: str = os.getenv(key="DISCORD_WEBHOOK_URL", default="")
INSTALLED_APPS: list[str] = [
"core.apps.CoreConfig",
"twitch.apps.TwitchConfig",
"twitch_app.apps.TwitchConfig",
"whitenoise.runserver_nostatic",
"django.contrib.admin",
"django.contrib.auth",
@ -72,6 +72,10 @@ INSTALLED_APPS: list[str] = [
"django.contrib.messages",
"django.contrib.staticfiles",
"ninja",
"allauth",
"allauth.account",
"allauth.socialaccount",
"allauth.socialaccount.providers.twitch",
]
MIDDLEWARE: list[str] = [
@ -83,6 +87,7 @@ MIDDLEWARE: list[str] = [
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"allauth.account.middleware.AccountMiddleware",
]
@ -155,3 +160,15 @@ LOGGING = {
},
},
}
LOGIN_URL = "/login/"
LOGIN_REDIRECT_URL = "/"
LOGOUT_REDIRECT_URL = "/"
SOCIALACCOUNT_ONLY = True
ACCOUNT_EMAIL_VERIFICATION = "none"
AUTHENTICATION_BACKENDS: list[str] = [
"django.contrib.auth.backends.ModelBackend",
"allauth.account.auth_backends.AuthenticationBackend",
]