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)
| 3188 | return f"{url}?v={version_hash}" |
| 3189 | |
| 3190 | def parse_url_path(self, url_path: str) -> str: |
| 3191 | """Converts a static URL path into a filesystem path. |
| 3192 | |
| 3193 | ``url_path`` is the path component of the URL with |
| 3194 | ``static_url_prefix`` removed. The return value should be |
| 3195 | filesystem path relative to ``static_path``. |
| 3196 | |
| 3197 | This is the inverse of `make_static_url`. |
| 3198 | """ |
| 3199 | if os.path.sep != "/": |
| 3200 | url_path = url_path.replace("/", os.path.sep) |
| 3201 | return url_path |
| 3202 | |
| 3203 | @classmethod |
| 3204 | def get_version(cls, settings: Dict[str, Any], path: str) -> Optional[str]: |