diff options
author | 2019-10-03 15:08:07 +0100 | |
---|---|---|
committer | 2019-10-03 15:08:07 +0100 | |
commit | 99bc330bf50232e6302a12ea86c62745f5d87fef (patch) | |
tree | 6734357165cda6bc5ab2f28d1d73882f4278d805 /pydis_site/settings.py | |
parent | Add link to Contributing landing page to our website's navbar (#270) (diff) |
Initial Allauth dependency and settings/urls
Diffstat (limited to 'pydis_site/settings.py')
-rw-r--r-- | pydis_site/settings.py | 17 |
1 files changed, 17 insertions, 0 deletions
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', +) |