MCPcopy
hub / github.com/django/django / find

Method find

django/contrib/staticfiles/finders.py:105–118  ·  view source on GitHub ↗

Look for files in the extra locations as defined in STATICFILES_DIRS.

(self, path, find_all=False)

Source from the content-addressed store, hash-verified

103 return errors
104
105 def find(self, path, find_all=False):
106 """
107 Look for files in the extra locations as defined in STATICFILES_DIRS.
108 """
109 matches = []
110 for prefix, root in self.locations:
111 if root not in searched_locations:
112 searched_locations.append(root)
113 matched_path = self.find_location(root, path, prefix)
114 if matched_path:
115 if not find_all:
116 return matched_path
117 matches.append(matched_path)
118 return matches
119
120 def find_location(self, root, path, prefix=None):
121 """

Callers 15

findFunction · 0.45
_line_at_positionMethod · 0.45
serveFunction · 0.45
handle_labelMethod · 0.45
autocomplete.jsFile · 0.45
addInlineAddButtonFunction · 0.45
addInlineClickHandlerFunction · 0.45
addInlineDeleteButtonFunction · 0.45
inlineDeleteHandlerFunction · 0.45
initPrepopulatedFieldsFunction · 0.45
updateInlineLabelFunction · 0.45

Calls 2

find_locationMethod · 0.95
appendMethod · 0.45