summaryrefslogtreecommitdiff
path: root/scipy2015/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'scipy2015/settings.py')
-rw-r--r--scipy2015/settings.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/scipy2015/settings.py b/scipy2015/settings.py
index 0ae22d3..3bd5ed1 100644
--- a/scipy2015/settings.py
+++ b/scipy2015/settings.py
@@ -9,6 +9,7 @@ https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
+from local import *
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
@@ -37,6 +38,7 @@ INSTALLED_APPS = (
'django.contrib.messages',
'django.contrib.staticfiles',
'website',
+ 'social.apps.django_app.default',
)
MIDDLEWARE_CLASSES = (
@@ -48,6 +50,25 @@ MIDDLEWARE_CLASSES = (
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
+TEMPLATE_CONTEXT_PROCESSORS = (
+ 'django.contrib.auth.context_processors.auth',
+ 'django.core.context_processors.debug',
+ 'django.core.context_processors.i18n',
+ 'django.core.context_processors.media',
+ 'django.core.context_processors.static',
+ 'django.core.context_processors.tz',
+ 'django.contrib.messages.context_processors.messages',
+ 'social.apps.django_app.context_processors.backends',
+ 'social.apps.django_app.context_processors.login_redirect',
+)
+
+AUTHENTICATION_BACKENDS = (
+ 'social.backends.facebook.FacebookOAuth2',
+ 'social.backends.google.GoogleOAuth2',
+ 'social.backends.twitter.TwitterOAuth',
+ 'django.contrib.auth.backends.ModelBackend',
+)
+
TEMPLATE_DIRS = (
os.path.join(BASE_DIR, '../website/templates'),
)
@@ -74,6 +95,9 @@ DATABASES = {
}
}
+SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = LOCAL_SOCIAL_AUTH_GOOGLE_OAUTH2_KEY
+SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = LOCAL_SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET
+
# Internationalization
# https://docs.djangoproject.com/en/1.6/topics/i18n/