MCPcopy
hub / github.com/django/django / _should_handle

Method _should_handle

django/test/testcases.py:1671–1677  ·  view source on GitHub ↗

Check if the path should be handled. Ignore the path if: * the host is provided as part of the base_url * the request's path isn't under the media path (or equal)

(self, path)

Source from the content-addressed store, hash-verified

1669 super().__init__()
1670
1671 def _should_handle(self, path):
1672 """
1673 Check if the path should be handled. Ignore the path if:
1674 * the host is provided as part of the base_url
1675 * the request's path isn't under the media path (or equal)
1676 """
1677 return path.startswith(self.base_url.path) and not self.base_url.netloc
1678
1679 def file_path(self, url):
1680 """Return the relative path to the file on disk for the given URL."""

Callers 2

get_responseMethod · 0.95
__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected