From 99bc330bf50232e6302a12ea86c62745f5d87fef Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Thu, 3 Oct 2019 15:08:07 +0100 Subject: Initial Allauth dependency and settings/urls --- pydis_site/settings.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'pydis_site/settings.py') diff --git a/pydis_site/settings.py b/pydis_site/settings.py index 4534f54b..189c35e6 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,13 @@ 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', +) -- cgit v1.2.3