MCPcopy
hub / github.com/django/django / load_manifest

Method load_manifest

django/contrib/staticfiles/storage.py:526–541  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

524 return None
525
526 def load_manifest(self):
527 content = self.read_manifest()
528 if content is None:
529 return {}, ""
530 try:
531 stored = json.loads(content)
532 except json.JSONDecodeError:
533 pass
534 else:
535 version = stored.get("version")
536 if version in ("1.0", "1.1"):
537 return stored.get("paths", {}), stored.get("hash", "")
538 raise ValueError(
539 "Couldn't load manifest '%s' (version %s)"
540 % (self.manifest_name, self.manifest_version)
541 )
542
543 def post_process(self, *args, **kwargs):
544 self.hashed_files = {}

Callers 6

__init__Method · 0.95
assertPostConditionMethod · 0.80
test_parse_cacheMethod · 0.80
test_manifest_hashMethod · 0.80
test_manifest_hash_v1Method · 0.80

Calls 3

read_manifestMethod · 0.95
loadsMethod · 0.45
getMethod · 0.45

Tested by 5

assertPostConditionMethod · 0.64
test_parse_cacheMethod · 0.64
test_manifest_hashMethod · 0.64
test_manifest_hash_v1Method · 0.64