mirror of
https://github.com/simonw/datasette.git
synced 2026-06-15 13:36:58 +02:00
Stored query pages now offer Edit and Delete actions in the query actions menu, gated by the update-query and delete-query permissions. - New QueryEditView (GET/POST at /<db>/<query>/-/edit) renders a pre-filled form for editing a query's title, description, SQL and privacy, reusing the create-query analysis UI. Changing the SQL still requires execute-sql; metadata-only edits do not. - QueryDeleteView gains a GET confirmation page and HTML form POST that redirects to the query list, while keeping the existing JSON API. - New default query_actions hook adds the Edit/Delete links for stored (non-config, non-trusted) queries the actor is allowed to manage. Permission semantics (already enforced by default_query_permissions_sql) are surfaced in the UI: owners can always edit/delete their queries; non-private queries can be edited/deleted by any actor with the relevant permission; private queries remain owner-only. Shared the create-query form styles into _query_form_styles.html so the edit form can reuse them. https://claude.ai/code/session_019GU9g3pZAERukLKYNa4uAL |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| base.py | ||
| database.py | ||
| execute_write.py | ||
| index.py | ||
| query_helpers.py | ||
| row.py | ||
| special.py | ||
| stored_queries.py | ||
| table.py | ||