From faa3e9b7240a43b4a33177b96ce0c90f18d2905d Mon Sep 17 00:00:00 2001 From: Umair Khan Date: Tue, 2 Aug 2016 12:42:50 +0500 Subject: [PATCH] Give logical defaults to social auth settings. Both key and secret settings of team and organization default to SOCIAL_AUTH_GITHUB_KEY and SOCIAL_AUTH_GITHUB_SECRET respectively. SOCIAL_AUTH_GITHUB_TEAM_ID and SOCIAL_AUTH_GITHUB_ORG_NAME default to `None`. --- zproject/settings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zproject/settings.py b/zproject/settings.py index c8fae26fe0..86a5227cc0 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -157,6 +157,8 @@ DEFAULT_SETTINGS = {'TWITTER_CONSUMER_KEY': '', 'REMOTE_POSTGRES_SSLMODE': '', 'GOOGLE_CLIENT_ID': '', 'SOCIAL_AUTH_GITHUB_KEY': None, + 'SOCIAL_AUTH_GITHUB_ORG_NAME': None, + 'SOCIAL_AUTH_GITHUB_TEAM_ID': None, 'DBX_APNS_CERT_FILE': None, 'DBX_APNS_KEY_FILE': None, 'EXTRA_INSTALLED_APPS': [], @@ -977,6 +979,10 @@ else: SOCIAL_AUTH_GITHUB_SECRET = get_secret('social_auth_github_secret') SOCIAL_AUTH_LOGIN_ERROR_URL = '/login/' SOCIAL_AUTH_GITHUB_SCOPE = ['email'] +SOCIAL_AUTH_GITHUB_ORG_KEY = SOCIAL_AUTH_GITHUB_KEY +SOCIAL_AUTH_GITHUB_ORG_SECRET = SOCIAL_AUTH_GITHUB_SECRET +SOCIAL_AUTH_GITHUB_TEAM_KEY = SOCIAL_AUTH_GITHUB_KEY +SOCIAL_AUTH_GITHUB_TEAM_SECRET = SOCIAL_AUTH_GITHUB_SECRET ######################################################################## # EMAIL SETTINGS