Converts a static URL path into a filesystem path. ``url_path`` is the path component of the URL with ``static_url_prefix`` removed. The return value should be filesystem path relative to ``static_path``. This is the inverse of `make_static_url`.
(self, url_path: str)
| 2985 | return "%s?v=%s" % (url, version_hash) |
| 2986 | |
| 2987 | def parse_url_path(self, url_path: str) -> str: |
| 2988 | """Converts a static URL path into a filesystem path. |
| 2989 | |
| 2990 | ``url_path`` is the path component of the URL with |
| 2991 | ``static_url_prefix`` removed. The return value should be |
| 2992 | filesystem path relative to ``static_path``. |
| 2993 | |
| 2994 | This is the inverse of `make_static_url`. |
| 2995 | """ |
| 2996 | if os.path.sep != "/": |
| 2997 | url_path = url_path.replace("/", os.path.sep) |
| 2998 | return url_path |
| 2999 | |
| 3000 | @classmethod |
| 3001 | def get_version(cls, settings: Dict[str, Any], path: str) -> Optional[str]: |