mostly replace please twitter and facebook settings
parent
7fe95e02b3
commit
fa9aa1801a
|
@ -6,6 +6,12 @@ import fileinput
|
|||
|
||||
import requests
|
||||
|
||||
try:
|
||||
from django.conf import settings
|
||||
GOOGLE_BOOKS_API_KEY = settings.GOOGLE_BOOKS_API_KEY
|
||||
except:
|
||||
GOOGLE_BOOKS_API_KEY = os.environ.get('GOOGLE_BOOKS_API_KEY', '')
|
||||
|
||||
def match():
|
||||
for line in fileinput.input():
|
||||
j = json.loads(line)
|
||||
|
@ -18,7 +24,7 @@ def google_search(title, authors, no_matches):
|
|||
# the title and author are intentionally not fielded
|
||||
params = {
|
||||
'q': title,
|
||||
'key': 'AIzaSyBE36z7o6NUafIWcLEB8yk2I47-8_5y1_0'
|
||||
'key': GOOGLE_BOOKS_API_KEY
|
||||
}
|
||||
for author in authors:
|
||||
params['q'] += ' ' + norm_author(author)
|
||||
|
|
|
@ -48,7 +48,8 @@ SOCIAL_AUTH_TWITTER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0'
|
|||
# facebook auth (for localvm)
|
||||
# https://developers.facebook.com/apps/401501793375379/settings/
|
||||
SOCIAL_AUTH_FACEBOOK_KEY = '401501793375379'
|
||||
SOCIAL_AUTH_FACEBOOK_SECRET = '7b63412aa28f408e6349eb0eceb1fcc3'
|
||||
# reset 2016.11.30
|
||||
# SOCIAL_AUTH_FACEBOOK_SECRET = '7b63412aa28f408e6349eb0eceb1fcc3'
|
||||
|
||||
# get these (as oauth2 client ID and Secret from
|
||||
# https://console.developers.google.com/project/grand-analyzer-95823/apiui/credential?clientType&authuser=0#
|
||||
|
|
|
@ -59,6 +59,7 @@ SOCIAL_AUTH_TWITTER_KEY = 'sd9StEg1N1qB8gGb2GRX4A'
|
|||
SOCIAL_AUTH_TWITTER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0'
|
||||
|
||||
# facebook auth
|
||||
# https://developers.facebook.com/apps/211951285561911/dashboard/
|
||||
SOCIAL_AUTH_FACEBOOK_KEY = '211951285561911'
|
||||
SOCIAL_AUTH_FACEBOOK_SECRET = '42efef7e540b80479dbbb69490cd902a'
|
||||
|
||||
|
|
|
@ -40,22 +40,21 @@ EMAIL_HOST_PASSWORD = '7k3sWyzHpI'
|
|||
EMAIL_PORT = 587
|
||||
DEFAULT_FROM_EMAIL = 'accounts@gluejar.com'
|
||||
|
||||
# googlebooks
|
||||
# GOOGLE_BOOKS_API_KEY = 'AIzaSyBE36z7o6NUafIWcLEB8yk2I47-8_5y1_0'
|
||||
# GOOGLE_BOOKS_API_KEY = os.environ.get('GOOGLE_BOOKS_API_KEY', '')
|
||||
|
||||
# all the SECRET_KEYS
|
||||
{% for key in SECRET_KEYS %}
|
||||
{{key}} = os.environ.get('{{key}}', '')
|
||||
{% endfor %}
|
||||
|
||||
# twitter auth
|
||||
SOCIAL_AUTH_TWITTER_KEY = 'sd9StEg1N1qB8gGb2GRX4A'
|
||||
SOCIAL_AUTH_TWITTER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0'
|
||||
# source?
|
||||
# SOCIAL_AUTH_TWITTER_KEY = 'sd9StEg1N1qB8gGb2GRX4A'
|
||||
# SOCIAL_AUTH_TWITTER_SECRET = 'YSKHn8Du6EWqpcWZ6sp5tqDPvcOBXK0WJWVGWyB0'
|
||||
|
||||
# facebook auth
|
||||
SOCIAL_AUTH_FACEBOOK_KEY = '242881179080779'
|
||||
SOCIAL_AUTH_FACEBOOK_SECRET = '5eae483a0e92113d884c427b578ef23a'
|
||||
# source?
|
||||
# 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
|
||||
|
@ -66,10 +65,6 @@ SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'zueklvlUNGgkxuAWTl-93q1z'
|
|||
GOODREADS_API_KEY = "vfqIO6QAhBVvlxt6hAzZJg"
|
||||
GOODREADS_API_SECRET = "57tq4MpyJ15Hgm2ToZQQFWJ7vraZzOAqHLckWRXQ"
|
||||
|
||||
# Freebase credentials
|
||||
FREEBASE_USERNAME = ''
|
||||
FREEBASE_PASSWORD = ''
|
||||
|
||||
# send celery log to Python logging
|
||||
CELERYD_HIJACK_ROOT_LOGGER = False
|
||||
|
||||
|
|
Loading…
Reference in New Issue