MCPcopy
hub / github.com/django/django / __init__

Method __init__

django/contrib/staticfiles/finders.py:155–172  ·  view source on GitHub ↗
(self, app_names=None, *args, **kwargs)

Source from the content-addressed store, hash-verified

153 source_dir = "static"
154
155 def __init__(self, app_names=None, *args, **kwargs):
156 # The list of apps that are handled
157 self.apps = []
158 # Mapping of app names to storage instances
159 self.storages = {}
160 app_configs = apps.get_app_configs()
161 if app_names:
162 app_names = set(app_names)
163 app_configs = [ac for ac in app_configs if ac.name in app_names]
164 for app_config in app_configs:
165 app_storage = self.storage_class(
166 os.path.join(app_config.path, self.source_dir)
167 )
168 if os.path.isdir(app_storage.location):
169 self.storages[app_config.name] = app_storage
170 if app_config.name not in self.apps:
171 self.apps.append(app_config.name)
172 super().__init__(*args, **kwargs)
173
174 def list(self, ignore_patterns):
175 """

Callers

nothing calls this directly

Calls 4

get_app_configsMethod · 0.80
joinMethod · 0.45
appendMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected