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

Method __init__

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

Source from the content-addressed store, hash-verified

43 """
44
45 def __init__(self, app_names=None, *args, **kwargs):
46 # List of locations with static files
47 self.locations = []
48 # Maps dir paths to an appropriate storage instance
49 self.storages = {}
50 for root in settings.STATICFILES_DIRS:
51 if isinstance(root, (list, tuple)):
52 prefix, root = root
53 else:
54 prefix = ""
55 if (prefix, root) not in self.locations:
56 self.locations.append((prefix, root))
57 for prefix, root in self.locations:
58 filesystem_storage = FileSystemStorage(location=root)
59 filesystem_storage.prefix = prefix
60 self.storages[root] = filesystem_storage
61 super().__init__(*args, **kwargs)
62
63 def check(self, **kwargs):
64 errors = []

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 2

FileSystemStorageClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected