MCPcopy
hub / github.com/django/django / get_paths

Method get_paths

django/views/i18n.py:127–141  ·  view source on GitHub ↗
(self, packages)

Source from the content-addressed store, hash-verified

125 return self.render_to_response(context)
126
127 def get_paths(self, packages):
128 allowable_packages = {
129 app_config.name: app_config for app_config in apps.get_app_configs()
130 }
131 app_configs = [
132 allowable_packages[p] for p in packages if p in allowable_packages
133 ]
134 if len(app_configs) < len(packages):
135 excluded = [p for p in packages if p not in allowable_packages]
136 raise ValueError(
137 "Invalid package(s) provided to JavaScriptCatalog: %s"
138 % ",".join(excluded)
139 )
140 # paths of requested packages
141 return [os.path.join(app.path, "locale") for app in app_configs]
142
143 @property
144 def _num_plurals(self):

Callers 1

getMethod · 0.95

Calls 2

get_app_configsMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected