def get_backends(force_load=False):
 global BACKENDSCACHE
 if ((not BACKENDSCACHE) or force_load):
  with _import_lock:
   for auth_backend in setting('SOCIAL_AUTH_AUTHENTICATION_BACKENDS'):
    (mod, cls_name) = auth_backend.rsplit('.', 1)
    module = __import__(mod, {}, {}, ['BACKENDS', cls_name])
    backend = getattr(module, cls_name)
    if issubclass(backend, SocialAuthBackend):
     name = backend.name
     backends = getattr(module, 'BACKENDS', {})
     if ((name in backends) and backends[name].enabled()):
      BACKENDSCACHE[name] = backends[name]
 return BACKENDSCACHE

def get_backends ( force_load = False ) : global BACKENDSCACHE if ( ( not BACKENDSCACHE ) or force_load ) : with _import_lock : for auth_backend in setting ( 'SOCIAL_AUTH_AUTHENTICATION_BACKENDS' ) : ( mod , cls_name ) = auth_backend . rsplit ( '.' , 1 ) module = __import__ ( mod , { } , { } , [ 'BACKENDS' , cls_name ] ) backend = getattr ( module , cls_name ) if issubclass ( backend , SocialAuthBackend ) : name = backend . name backends = getattr ( module , 'BACKENDS' , { } ) if ( ( name in backends ) and backends [ name ] . enabled ( ) ) : BACKENDSCACHE [ name ] = backends [ name ] return BACKENDSCACHE
entry point to the backends cache .