mirror of
https://github.com/simonw/datasette.git
synced 2026-05-30 21:57:00 +02:00
Fix for /-/jump with base_url set, closes #2757
This commit is contained in:
parent
c1476a48d8
commit
81a4df8a3e
2 changed files with 12 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue