Improve admin page

This commit is contained in:
2024-07-01 17:41:51 +02:00
parent 219aee31af
commit 40587fa24f
11 changed files with 633 additions and 32 deletions

View File

@ -76,6 +76,7 @@ INSTALLED_APPS: list[str] = [
"allauth.account",
"allauth.socialaccount",
"allauth.socialaccount.providers.twitch",
"simple_history",
]
MIDDLEWARE: list[str] = [
@ -88,6 +89,7 @@ MIDDLEWARE: list[str] = [
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"allauth.account.middleware.AccountMiddleware",
"simple_history.middleware.HistoryRequestMiddleware",
]
@ -166,9 +168,16 @@ LOGIN_REDIRECT_URL = "/"
LOGOUT_REDIRECT_URL = "/"
SOCIALACCOUNT_ONLY = True
ACCOUNT_EMAIL_VERIFICATION = "none"
SOCIALACCOUNT_STORE_TOKENS = True
AUTHENTICATION_BACKENDS: list[str] = [
"django.contrib.auth.backends.ModelBackend",
"allauth.account.auth_backends.AuthenticationBackend",
]
SOCIALACCOUNT_PROVIDERS = {
"twitch": {
"SCOPE": ["user:read:email"],
"AUTH_PARAMS": {"force_verify": True},
},
}