def __init__(self, request, scopes=None, return_url=None):
        """Initialize the Oauth2 Object.

        Args:
            request: Django request object.
            scopes: Scopes desired for this OAuth2 flow.
            return_url: The url to return to after the OAuth flow is complete,
                 defaults to the request's current URL path.
        """
        self.request = request
        self.return_url = return_url or request.get_full_path()
        if scopes:
            self._scopes = set(oauth2_settings.scopes) | set(scopes)
        else:
            self._scopes = set(oauth2_settings.scopes)
def __init__ ( self , request , scopes = None , return_url = None ) : self . request = request self . return_url = return_url or request . get_full_path ( ) if scopes : self . _scopes = set ( oauth2_settings . scopes ) | set ( scopes ) else : self . _scopes = set ( oauth2_settings . scopes )
Initialize the Oauth2 Object.

        Args:
            request: Django request object.
            scopes: Scopes desired for this OAuth2 flow.
            return_url: The url to return to after the OAuth flow is complete,
                 defaults to the request's current URL path.