#NEWLINE# def _get_oauth2_client_id_and_secret( settings_instance ) : #NEWLINE# #INDENT# 'Initializes client id and client secret based on the settings' #NEWLINE# secret_json = getattr ( django . conf . settings , 'GOOGLE_OAUTH2_CLIENT_SECRETS_JSON' , None ) #NEWLINE# if ( secret_json is not None ) : #NEWLINE# #INDENT# return _load_client_secrets ( secret_json ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# client_id = getattr ( settings_instance , 'GOOGLE_OAUTH2_CLIENT_ID' , None ) #NEWLINE# client_secret = getattr ( settings_instance , 'GOOGLE_OAUTH2_CLIENT_SECRET' , None ) #NEWLINE# if ( ( client_id is not None ) and ( client_secret is not None ) ) : #NEWLINE# #INDENT# return ( secret_json , client_secret ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise exceptions . ImproperlyConfigured ( 'Must specify either GOOGLE_OAUTH2_CLIENT_SECRETS_JSON, or   both GOOGLE_OAUTH2_CLIENT_ID and GOOGLE_OAUTH2_CLIENT_SECRET in settings.py' )