mirror of
https://github.com/simonw/datasette.git
synced 2026-06-07 09:36:57 +02:00
Remove navigation_search_js_hash mechanism
Codex added this because CSS was not reloading in dev.
This commit is contained in:
parent
f46c245563
commit
9e7419db8d
4 changed files with 2 additions and 9 deletions
|
|
@ -2052,7 +2052,6 @@ class Datasette:
|
|||
and "ds_actor" in request.cookies
|
||||
and request.actor,
|
||||
"app_css_hash": self.app_css_hash(),
|
||||
"navigation_search_js_hash": self.static_hash("navigation-search.js"),
|
||||
"zip": zip,
|
||||
"body_scripts": body_scripts,
|
||||
"format_bytes": format_bytes,
|
||||
|
|
|
|||
|
|
@ -67,9 +67,6 @@ def handle_exception(datasette, request, exception):
|
|||
info,
|
||||
urls=datasette.urls,
|
||||
app_css_hash=datasette.app_css_hash(),
|
||||
navigation_search_js_hash=datasette.static_hash(
|
||||
"navigation-search.js"
|
||||
),
|
||||
menu_links=lambda: [],
|
||||
)
|
||||
),
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
{% endfor %}
|
||||
|
||||
{% if select_templates %}<!-- Templates considered: {{ select_templates|join(", ") }} -->{% endif %}
|
||||
<script src="{{ urls.static('navigation-search.js') }}{% if navigation_search_js_hash is defined %}?{{ navigation_search_js_hash }}{% endif %}" defer></script>
|
||||
<script src="{{ urls.static('navigation-search.js') }}" defer></script>
|
||||
<navigation-search url="/-/jump"></navigation-search>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1022,10 +1022,7 @@ async def test_navigation_menu_links(
|
|||
navigation_search_script = soup.find(
|
||||
"script", {"src": re.compile(r"navigation-search\.js")}
|
||||
)
|
||||
assert navigation_search_script["src"] == (
|
||||
"/-/static/navigation-search.js?"
|
||||
+ ds_client.ds.static_hash("navigation-search.js")
|
||||
)
|
||||
assert navigation_search_script["src"] == "/-/static/navigation-search.js"
|
||||
assert details.find("li").find("button") == search_button
|
||||
if not actor_id:
|
||||
# The app menu is always visible, but anonymous users do not see logout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue