hash busting thing on table.js

Addd for Codex Desktop, which has real trouble with edits
to files like this as the in-app browser does not seem to
have a cache-busting reload option.
This commit is contained in:
Simon Willison 2026-06-13 14:38:49 -07:00
commit de5f72dd88
2 changed files with 2 additions and 1 deletions

View file

@ -2312,6 +2312,7 @@ class Datasette:
and "ds_actor" in request.cookies
and request.actor,
"app_css_hash": self.app_css_hash(),
"table_js_hash": self.static_hash("table.js"),
"zip": zip,
"body_scripts": body_scripts,
"format_bytes": format_bytes,

View file

@ -5,7 +5,7 @@
{% block extra_head %}
{{- super() -}}
<script src="{{ urls.static('column-chooser.js') }}" defer></script>
<script src="{{ urls.static('table.js') }}" defer></script>
<script src="{{ urls.static('table.js') }}?hash={{ table_js_hash }}" defer></script>
<script src="{{ urls.static('mobile-column-actions.js') }}" defer></script>
<script>DATASETTE_ALLOW_FACET = {{ datasette_allow_facet }};</script>
<style>