MCPcopy
hub / github.com/django/django / _stored_name

Method _stored_name

django/contrib/staticfiles/storage.py:469–479  ·  view source on GitHub ↗
(self, name, hashed_files)

Source from the content-addressed store, hash-verified

467 return name
468
469 def _stored_name(self, name, hashed_files):
470 # Normalize the path to avoid multiple names for the same file like
471 # ../foo/bar.css and ../foo/../foo/bar.css which normalize to the same
472 # path.
473 name = posixpath.normpath(name)
474 cleaned_name = self.clean_name(name)
475 hash_key = self.hash_key(cleaned_name)
476 cache_name = hashed_files.get(hash_key)
477 if cache_name is None:
478 cache_name = self.clean_name(self.hashed_name(name))
479 return cache_name
480
481 def stored_name(self, name):
482 cleaned_name = self.clean_name(name)

Callers

nothing calls this directly

Calls 4

clean_nameMethod · 0.95
hash_keyMethod · 0.95
hashed_nameMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected