From e87294d4427986e0989da71a88402952044b603f Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 9 Apr 2015 11:44:48 -0400 Subject: [PATCH] twitter and facebook settings --- frontend/templates/supporter.html | 8 ++++---- settings/common.py | 11 +++-------- settings/jenkins.py | 27 ++++----------------------- settings/just.py | 23 ++++------------------- settings/prod.py | 30 ++++-------------------------- 5 files changed, 19 insertions(+), 80 deletions(-) diff --git a/frontend/templates/supporter.html b/frontend/templates/supporter.html index 06237093..99a622a4 100644 --- a/frontend/templates/supporter.html +++ b/frontend/templates/supporter.html @@ -182,16 +182,16 @@ function highlightTarget(targetdiv) {
{% if supporter.profile.twitter_id %} - Update your Twitter connection
or disconnect Twitter: {{ profile_form.clear_twitter }} + Update your Twitter connection
or disconnect Twitter: {{ profile_form.clear_twitter }} {% else %} - Connect your Twitter account to Unglue.it + Connect your Twitter account to Unglue.it {% endif %}
{% if supporter.profile.facebook_id %} - Update your Facebook connection
or disconnect Facebook: {{ profile_form.clear_facebook }} + Update your Facebook connection
or disconnect Facebook: {{ profile_form.clear_facebook }} {% else %} - Connect your Facebook account to Unglue.it + Connect your Facebook account to Unglue.it {% endif %}
diff --git a/settings/common.py b/settings/common.py index d2758ee0..24056713 100644 --- a/settings/common.py +++ b/settings/common.py @@ -252,7 +252,7 @@ SOCIAL_AUTH_PIPELINE = ( # Disabled by default. # 'social.pipeline.mail.mail_validation', - #'regluit.core.auth.selectively_associate', + 'regluit.core.auth.selectively_associate', # Associates the current social details with another user account with # a similar email address. Disabled by default. 'social.pipeline.social_auth.associate_by_email', @@ -262,7 +262,7 @@ SOCIAL_AUTH_PIPELINE = ( # Create the record that associated the social account with this user. 'social.pipeline.social_auth.associate_user', - #'regluit.core.auth.deliver_extra_data', + 'regluit.core.auth.deliver_extra_data', # Populate the extra_data field in the social record with the values # specified by settings (and the default ones like access_token, etc). @@ -271,13 +271,8 @@ SOCIAL_AUTH_PIPELINE = ( # Update the user record with any changed info from the auth service. 'social.pipeline.user.user_details' ) -# define in server-specific files -# get these (as oauth2 client ID and Secret from -# https://console.developers.google.com/project/569579163337/apiui/credential?authuser=1 -#SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '...' -#SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = '...' -TWITTER_EXTRA_DATA = [('profile_image_url_https', 'profile_image_url_https'),('screen_name','screen_name')] +SOCIAL_AUTH_TWITTER_EXTRA_DATA = [('profile_image_url_https', 'profile_image_url_https'),('screen_name','screen_name')] LOGIN_URL = "/accounts/superlogin/" LOGIN_REDIRECT_URL = "/" diff --git a/settings/jenkins.py b/settings/jenkins.py index 871adfbc..c5ebd8b4 100644 --- a/settings/jenkins.py +++ b/settings/jenkins.py @@ -37,18 +37,13 @@ EMAIL_PORT = 587 DEFAULT_FROM_EMAIL = 'info@gluejar.com' # twitter auth -# you'll need to create a new Twitter application to fill in these blanks -# https://dev.twitter.com/apps/new - -TWITTER_CONSUMER_KEY = '' -TWITTER_CONSUMER_SECRET = '' +SOCIAL_AUTH_TWITTER_KEY = '' +SOCIAL_AUTH_TWITTER_SECRET = '' # facebook auth -# you'll need to create a new Facebook application to fill in these blanks -# https://developers.facebook.com/apps/ +SOCIAL_AUTH_FACEBOOK_KEY = '' +SOCIAL_AUTH_FACEBOOK_SECRET = '' -FACEBOOK_APP_ID = '' -FACEBOOK_API_SECRET = '' # get these (as oauth2 client ID and Secret from @@ -60,20 +55,6 @@ SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'RWPnUkNieUToUtBFaXZjibsU' # registered to rdhye@gluejar.com on 2013.12.10 GOOGLE_BOOKS_API_KEY = 'AIzaSyC-nBaK90PIsovMRbswPYEKgA6cJfYSDmY' -PAYPAL_USERNAME = '' -PAYPAL_PASSWORD = '' -PAYPAL_SIGNATURE = '' -PAYPAL_APPID = '' - -PAYPAL_ENDPOINT = 'svcs.sandbox.paypal.com' # sandbox -PAYPAL_PAYMENT_HOST = 'http://www.sandbox.paypal.com' # sandbox - -PAYPAL_SANDBOX_LOGIN = '' -PAYPAL_SANDBOX_PASSWORD = '' - -PAYPAL_BUYER_LOGIN ='' -PAYPAL_BUYER_PASSWORD = '' - BASE_URL = 'http://0.0.0.0/' BASE_URL_SECURE = 'http://0.0.0.0/' IPN_SECURE_URL = False diff --git a/settings/just.py b/settings/just.py index 672f30ac..4ad6d993 100644 --- a/settings/just.py +++ b/settings/just.py @@ -53,33 +53,18 @@ DEFAULT_FROM_EMAIL = 'notices@gluejar.com' GOOGLE_BOOKS_API_KEY = 'AIzaSyBPZS7D3QvypGN_Tqc3blAXV1iJJJuu4mk' # twitter auth -TWITTER_CONSUMER_KEY = 'sd9StEg1N1qB8gGb2GRX4A' -TWITTER_CONSUMER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0' +SOCIAL_AUTH_TWITTER_KEY = 'sd9StEg1N1qB8gGb2GRX4A' +SOCIAL_AUTH_TWITTER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0' # facebook auth -FACEBOOK_APP_ID = '242881179080779' -FACEBOOK_API_SECRET = '5eae483a0e92113d884c427b578ef23a' +SOCIAL_AUTH_FACEBOOK_KEY = '242881179080779' +SOCIAL_AUTH_FACEBOOK_SECRET = '5eae483a0e92113d884c427b578ef23a' # get these (as oauth2 client ID and Secret from # https://console.developers.google.com/project/569579163337/apiui/credential?authuser=1 SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '569579163337-kq3vm5imdap4hapj1r8lvmcg05kfi6ii.apps.googleusercontent.com' SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'IYmgelotf77H8OPWX8oXf4Cq' -# credentials from a sandbox account that Raymond set up. -PAYPAL_USERNAME = 'glueja_1317336101_biz_api1.gluejar.com' -PAYPAL_PASSWORD = '1317336137' -PAYPAL_SIGNATURE = 'AHVb0D1mzGD6zdX4XtKZbH.Kd6OhALVyiJVbNReOZEfyz79AoEnQJWTR' -PAYPAL_APPID = 'APP-80W284485P519543T' # sandbox app id -- will have to replace with production id - -PAYPAL_ENDPOINT = 'svcs.sandbox.paypal.com' # sandbox -PAYPAL_PAYMENT_HOST = 'https://www.sandbox.paypal.com' # sandbox - -PAYPAL_SANDBOX_LOGIN = '' -PAYPAL_SANDBOX_PASSWORD = '' - -PAYPAL_BUYER_LOGIN ='' -PAYPAL_BUYER_PASSWORD = '' - # in live system, replace with the real Gluejar paypal email and that for our non-profit partner PAYPAL_GLUEJAR_EMAIL = "glueja_1317336101_biz@gluejar.com" PAYPAL_NONPROFIT_PARTNER_EMAIL = "nppart_1318957063_per@gluejar.com" diff --git a/settings/prod.py b/settings/prod.py index 60f064fe..b4135532 100644 --- a/settings/prod.py +++ b/settings/prod.py @@ -54,40 +54,18 @@ DEFAULT_FROM_EMAIL = 'notices@gluejar.com' GOOGLE_BOOKS_API_KEY = 'AIzaSyAGUEeGJXXLj9Tau4fpIFUCdOSKfDmJDVw' # twitter auth -TWITTER_CONSUMER_KEY = 'sd9StEg1N1qB8gGb2GRX4A' -TWITTER_CONSUMER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0' +SOCIAL_AUTH_TWITTER_KEY = 'sd9StEg1N1qB8gGb2GRX4A' +SOCIAL_AUTH_TWITTER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0' # facebook auth -FACEBOOK_APP_ID = '211951285561911' -FACEBOOK_API_SECRET = '42efef7e540b80479dbbb69490cd902a' +SOCIAL_AUTH_FACEBOOK_KEY = '211951285561911' +SOCIAL_AUTH_FACEBOOK_SECRET = '42efef7e540b80479dbbb69490cd902a' # get these (as oauth2 client ID and Secret from # https://console.developers.google.com/project/569579163337/apiui/credential?authuser=1 SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '569579163337-k83htoc5h00mqs4rr6tv22tdcc23jh4r.apps.googleusercontent.com' SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'ZyV5Q-E2MkJhRGm42XQAPeZi' -# credentials from a sandbox account that Raymond set up. -PAYPAL_USERNAME = 'glueja_1317336101_biz_api1.gluejar.com' -PAYPAL_PASSWORD = '1317336137' -PAYPAL_SIGNATURE = 'AHVb0D1mzGD6zdX4XtKZbH.Kd6OhALVyiJVbNReOZEfyz79AoEnQJWTR' -PAYPAL_APPID = 'APP-80W284485P519543T' # sandbox app id -- will have to replace with production id - -PAYPAL_ENDPOINT = 'svcs.sandbox.paypal.com' # sandbox -PAYPAL_PAYMENT_HOST = 'https://www.sandbox.paypal.com' # sandbox - -PAYPAL_SANDBOX_LOGIN = '' -PAYPAL_SANDBOX_PASSWORD = '' - -PAYPAL_BUYER_LOGIN ='' -PAYPAL_BUYER_PASSWORD = '' - -# in live system, replace with the real Gluejar paypal email and that for our non-profit partner -PAYPAL_GLUEJAR_EMAIL = "glueja_1317336101_biz@gluejar.com" -PAYPAL_NONPROFIT_PARTNER_EMAIL = "nppart_1318957063_per@gluejar.com" - -# for test purposes have a single RH paypal email -PAYPAL_TEST_RH_EMAIL = "rh1_1317336251_biz@gluejar.com" - # Goodreads API GOODREADS_API_KEY = "vfqIO6QAhBVvlxt6hAzZJg" GOODREADS_API_SECRET = "57tq4MpyJ15Hgm2ToZQQFWJ7vraZzOAqHLckWRXQ"