aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'pydis_site/settings.py')
-rw-r--r--pydis_site/settings.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/pydis_site/settings.py b/pydis_site/settings.py
index 4534f54b..21841e15 100644
--- a/pydis_site/settings.py
+++ b/pydis_site/settings.py
@@ -82,6 +82,13 @@ INSTALLED_APPS = [
'django.contrib.sites.apps.SitesConfig',
'django.contrib.staticfiles',
+ 'allauth',
+ 'allauth.account',
+ 'allauth.socialaccount',
+
+ 'allauth.socialaccount.providers.discord',
+ 'allauth.socialaccount.providers.github',
+
'crispy_forms',
'django_crispy_bulma',
'django_hosts',
@@ -347,3 +354,15 @@ WIKI_MARKDOWN_HTML_ATTRIBUTES = {
WIKI_MARKDOWN_HTML_WHITELIST = [
'article', 'section', 'button'
]
+
+# Django Allauth stuff
+
+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',
+)
+
+ACCOUNT_EMAIL_VERIFICATION = "none" # No verification required; we don't use emails for anything