MCPcopy
hub / github.com/django/django / _get_backends

Function _get_backends

django/contrib/auth/__init__.py:26–36  ·  view source on GitHub ↗
(return_tuples=False)

Source from the content-addressed store, hash-verified

24
25
26def _get_backends(return_tuples=False):
27 backends = []
28 for backend_path in settings.AUTHENTICATION_BACKENDS:
29 backend = load_backend(backend_path)
30 backends.append((backend, backend_path) if return_tuples else backend)
31 if not backends:
32 raise ImproperlyConfigured(
33 "No authentication backends have been defined. Does "
34 "AUTHENTICATION_BACKENDS contain anything?"
35 )
36 return backends
37
38
39def get_backends():

Callers 3

get_backendsFunction · 0.85
_get_compatible_backendsFunction · 0.85
_get_backend_from_userFunction · 0.85

Calls 3

load_backendFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected