#NEWLINE# def __init__( self , settings_instance ) : #NEWLINE# #INDENT# self . scopes = getattr ( settings_instance , 'GOOGLE_OAUTH2_SCOPES' , GOOGLE_OAUTH2_DEFAULT_SCOPES ) #NEWLINE# self . request_prefix = getattr ( settings_instance , 'GOOGLE_OAUTH2_REQUEST_ATTRIBUTE' , GOOGLE_OAUTH2_REQUEST_ATTRIBUTE ) #NEWLINE# ( self . client_id , self . client_secret ) = _get_oauth2_client_id_and_secret ( settings_instance ) #NEWLINE# if ( 'django.contrib.sessions.middleware.SessionMiddleware' not in settings_instance . MIDDLEWARE_CLASSES ) : #NEWLINE# #INDENT# raise exceptions . ImproperlyConfigured ( "The Google OAuth2 Helper requires session middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to include 'django.contrib.sessions.middleware.SessionMiddleware'." )