From 0db60e6e41954338833589d12111c3f7cf294fd0 Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Tue, 23 Jun 2015 17:41:09 +0530 Subject: add cfp & its reated functionalities --- scipy2015/settings.py | 23 ++++++++++++++++++ scipy2015/urls.py | 2 ++ website/templates/base.html | 14 ++++++----- website/templates/cfp.html | 59 +++++++++++++++++++++++++++++++++++++++++++++ website/urls.py | 1 + website/views.py | 8 ++++++ 6 files changed, 101 insertions(+), 6 deletions(-) create mode 100644 website/templates/cfp.html diff --git a/scipy2015/settings.py b/scipy2015/settings.py index 0ae22d3..768498a 100644 --- a/scipy2015/settings.py +++ b/scipy2015/settings.py @@ -37,6 +37,7 @@ INSTALLED_APPS = ( 'django.contrib.messages', 'django.contrib.staticfiles', 'website', + 'social.apps.django_app.default', ) MIDDLEWARE_CLASSES = ( @@ -48,6 +49,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 +94,9 @@ DATABASES = { } } +SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '435463679202-ec0cuk2jbnhactnad44fuodoftl6rjbp.apps.googleusercontent.com' +SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'vdeG2MFpC0fgIZqDUjqX1ncK' + # Internationalization # https://docs.djangoproject.com/en/1.6/topics/i18n/ diff --git a/scipy2015/urls.py b/scipy2015/urls.py index b0c6df2..18b0206 100644 --- a/scipy2015/urls.py +++ b/scipy2015/urls.py @@ -10,4 +10,6 @@ urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^', include('website.urls', namespace='website')), + url(r'^', include('social.apps.django_app.urls', namespace='social')), + url(r'^', include('django.contrib.auth.urls', namespace='auth')), ) diff --git a/website/templates/base.html b/website/templates/base.html index 4ac71c2..ae9f550 100644 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -34,6 +34,8 @@
+ +{% block navbar %} +{% endblock %} +{% block content %}