Fix for /-/jump with base_url set, closes #2757

This commit is contained in:
Simon Willison 2026-05-30 12:24:28 -07:00
commit 81a4df8a3e
2 changed files with 12 additions and 1 deletions

View file

@ -71,6 +71,6 @@
{% if select_templates %}<!-- Templates considered: {{ select_templates|join(", ") }} -->{% endif %}
<script src="{{ urls.static('navigation-search.js') }}" defer></script>
<navigation-search url="/-/jump"></navigation-search>
<navigation-search url="{{ urls.path("/-/jump") }}"></navigation-search>
</body>
</html>

View file

@ -943,6 +943,17 @@ def test_base_url_config(app_client_base_url_prefix, path, use_prefix):
indent=4,
default=repr,
)
for el in soup.find_all("navigation-search"):
assert el["url"] == "/prefix/-/jump", json.dumps(
{
"path": path,
"path_to_get": path_to_get,
"url": el["url"],
"element": str(el),
},
indent=4,
default=repr,
)
def test_base_url_affects_filter_redirects(app_client_base_url_prefix):