mirror of
https://github.com/simonw/datasette.git
synced 2026-06-06 09:07:00 +02:00
The CSS link in base.html already carries `?{{ app_css_hash }}` so that
browsers refetch when the bundled file changes. The five first-party JS
files shipped with datasette did not. Cache-busting JS the same way
matches the existing CSS pattern and uses the static_hash() helper that
already powers app_css_hash().
Files updated:
- datasette/app.py: expose static_hash as a callable in template context.
- datasette/handle_exception.py: include static_hash in the error-page
template context (mirrors the existing app_css_hash entry there).
- datasette/templates/base.html: hash datasette-manager.js and
navigation-search.js.
- datasette/templates/table.html: hash column-chooser.js, table.js, and
mobile-column-actions.js.
- tests/test_html.py: new test_js_content_hash parametrized across all
five files; existing test_navigation_menu_links updated to expect the
new query string.
Vendored libraries (cm-editor-6.0.1.bundle.js, sql-formatter-2.3.3.min.js,
json-format-highlight-1.0.1.js) already carry a version in the filename
and were left unchanged.
|
||
|---|---|---|
| .. | ||
| _action_menu.html | ||
| _close_open_menus.html | ||
| _codemirror.html | ||
| _codemirror_foot.html | ||
| _crumbs.html | ||
| _debug_common_functions.html | ||
| _description_source_license.html | ||
| _facet_results.html | ||
| _footer.html | ||
| _permission_ui_styles.html | ||
| _permissions_debug_tabs.html | ||
| _suggested_facets.html | ||
| _table.html | ||
| allow_debug.html | ||
| api_explorer.html | ||
| base.html | ||
| create_token.html | ||
| csrf_error.html | ||
| database.html | ||
| debug_actions.html | ||
| debug_allowed.html | ||
| debug_check.html | ||
| debug_permissions_playground.html | ||
| debug_rules.html | ||
| error.html | ||
| index.html | ||
| logout.html | ||
| messages_debug.html | ||
| patterns.html | ||
| query.html | ||
| row.html | ||
| schema.html | ||
| show_json.html | ||
| table.html | ||