MCPcopy
hub / github.com/django/django / _load_library

Method _load_library

django/contrib/auth/hashers.py:224–240  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

222 salt_entropy = 128
223
224 def _load_library(self):
225 if self.library is not None:
226 if isinstance(self.library, (tuple, list)):
227 name, mod_path = self.library
228 else:
229 mod_path = self.library
230 try:
231 module = importlib.import_module(mod_path)
232 except ImportError as e:
233 raise ValueError(
234 "Couldn't load %r algorithm library: %s"
235 % (self.__class__.__name__, e)
236 )
237 return module
238 raise ValueError(
239 "Hasher %r doesn't specify a library attribute" % self.__class__.__name__
240 )
241
242 def salt(self):
243 """

Callers 8

encodeMethod · 0.80
decodeMethod · 0.80
verifyMethod · 0.80
paramsMethod · 0.80
saltMethod · 0.80
encodeMethod · 0.80

Calls 1

import_moduleMethod · 0.80