Simon Willison
333f786cb0
Correct syntax for link headers, closes #2470
2025-03-09 20:05:43 -05:00
Alex Garcia
a23c2aee00
Introduce new /$DB/-/query endpoint, soft replaces /$DB?sql=... ( #2363 )
...
* Introduce new default /$DB/-/query endpoint
* Fix a lot of tests
* Update pyodide test to use query endpoint
* Link to /fixtures/-/query in a few places
* Documentation for QueryView
---------
Co-authored-by: Simon Willison <swillison@gmail.com>
2024-07-15 10:33:51 -07:00
Alex Garcia
35deaabcb1
Move non-metadata configuration from metadata.yaml to datasette.yaml
...
* Allow and permission blocks moved to datasette.yaml
* Documentation updates, initial framework for configuration reference
2023-10-12 09:16:37 -07:00
Simon Willison
a3593c9015
on_success_message_sql, closes #2138
2023-08-09 17:32:07 -07:00
Simon Willison
26be9f0445
Refactored canned query code, replaced old QueryView, closes #2114
2023-08-09 08:26:52 -07:00
Simon Willison
234230e595
Default JSON shape is now objects - refs #1914 , #1709
2022-12-31 10:52:37 -08:00
Simon Willison
9c43b4164d
Removed @pytest.mark.ds_client mark - refs #1959
...
I don't need it - can run 'pytest -k ds_client' instead.
See https://github.com/simonw/datasette/pull/1960#issuecomment-1355685828
2022-12-17 13:47:55 -08:00
Simon Willison
3001eec66a
ds_client for test_csv.py and test_canned_queries.py, refs #1959
2022-12-17 13:47:55 -08:00
Simon Willison
c1396bf860
Don't allow canned write queries on immutable DBs, closes #1728
2022-08-14 09:34:31 -07:00
Simon Willison
b72b2423c7
rel=alternate JSON for queries and database pages, closes #1620
2022-02-02 13:22:45 -08:00
Simon Willison
4094741c28
Fixed bug with custom templates for writable canned queries, closes #1547
2021-12-19 13:11:57 -08:00
Simon Willison
b267b57754
Upgrade to httpx 0.20
...
* Upgrade to httpx 0.20, closes #1488
* TestClient.post() should not default to following redirects
2021-10-14 11:03:44 -07:00
Simon Willison
1163da8916
Update test to handle Python 3.10 error message differenc, refs #1482
2021-10-08 17:32:52 -07:00
Simon Willison
9552414e1f
Re-display user's query with an error message if an error occurs ( #1346 )
...
* Ignore _shape when returning errors
2021-06-01 20:46:20 -07:00
Simon Willison
30e64c8d3b
Use f-strings in place of .format()
...
Code transformed like so:
pip install flynt
flynt .
black .
2020-11-15 15:24:22 -08:00
Simon Willison
448d13ea6b
Fix for MagicParameters error with no POST body, closes #967
2020-09-15 13:12:57 -07:00
Simon Willison
72ac2fd32c
JSON API for writable canned queries, closes #880
2020-09-14 14:23:18 -07:00
Simon Willison
894999a14e
Improved test for JSON POST, refs #880
2020-09-14 13:25:09 -07:00
Simon Willison
896fce228f
Canned query writes support JSON POST body, refs #880
2020-09-14 13:18:15 -07:00
Simon Willison
a648bb82ba
Upgrade to Black 20.8b1, closes #958
2020-09-02 15:24:55 -07:00
Simon Willison
7f10f0f766
Fix for security issue #918
2020-08-09 09:03:35 -07:00
Simon Willison
3ec5b1abf6
CSRF tests for canned query POST, closes #835
2020-06-30 20:08:00 -07:00
Simon Willison
9ac6292614
_header_x now defaults to empty string
...
Prior to this a request to e.g. https://latest.datasette.io/fixtures/magic_parameters
which did not include a User-Agent header would trigger a 500 error.
2020-06-30 15:00:17 -07:00
Simon Willison
0991ea75cc
Renamed _timestamp to _now, refs #842 , closes #871
2020-06-28 12:47:28 -07:00
Simon Willison
563f5a2d3a
Magic parameters for canned queries
...
Closes #842
Includes a new plugin hook, register_magic_parameters()
2020-06-27 19:58:16 -07:00