Simon Willison
7818e8b9d1
Hide tables starting with an _, refs #2104
2024-03-07 00:03:42 -05:00
Simon Willison
398a92cf1e
Include database in name of _execute_writes thread, closes #2265
2024-02-08 20:12:31 -08:00
Simon Willison
60c6692f68
table_config instead of table_metadata ( #2257 )
...
Table configuration that was incorrectly placed in metadata is now treated as if it was in config.
New await datasette.table_config() method.
Closes #2247
2024-02-06 21:57:09 -08:00
Simon Willison
1e901aa690
/-/config page, closes #2254
2024-02-06 12:33:46 -08:00
Simon Willison
bcc4f6bf1f
track_event() mechanism for analytics and plugins
...
* Closes #2240
* Documentation for event plugin hooks, refs #2240
* Include example track_event plugin in docs, refs #2240
* Tests for track_event() and register_events() hooks, refs #2240
* Initial documentation for core events, refs #2240
* Internals documentation for datasette.track_event()
2024-01-31 15:21:40 -08:00
Simon Willison
2200abfa17
Fix for flaky test_hidden_sqlite_stat1_table, closes #2179
2023-09-07 15:49:50 -07:00
Simon Willison
e34d09c6ec
Don't include columns in query JSON, refs #2136
2023-08-09 12:01:59 -07:00
Simon Willison
1377a290cd
New JSON design for query views ( #2118 )
...
* Refs #2111 , closes #2110
* New Context dataclass/subclass mechanism, refs #2127
* Define QueryContext and extract get_tables() method, refs #2127
* Fix OPTIONS bug by porting DaatbaseView to be a View subclass
* Expose async_view_for_class.view_class for test_routes test
* Error/truncated aruments for renderers, closes #2130
2023-08-07 18:47:39 -07:00
Simon Willison
8cd60fd1d8
Homepage test now just asserts isinstance(x, int) - closes #2092
2023-06-29 08:24:09 -07:00
Simon Willison
b49fa446d6
--cors Access-Control-Max-Age: 3600, closes #2079
2023-05-25 15:05:58 -07:00
Simon Willison
d97e82df3c
?_extra= support and TableView refactor to table_view
...
* Implemented ?_extra= option for JSON views, refs #262
* New dependency: asyncinject
* Remove now-obsolete TableView class
2023-03-22 15:49:39 -07:00
Simon Willison
c41278b46f
default_allow_sql setting, closes #1409
...
Refs #1410
2023-01-04 16:51:26 -08:00
Simon Willison
5bbe2bcc50
Rename filtered_table_rows_count to count, refs #782
2022-12-31 12:52:57 -08: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
42a66c2f04
A bunch of remaining ds_client conversions, refs #1959
2022-12-17 13:47:55 -08:00
Simon Willison
b077e63dc6
Ported test_api.py app_client test to ds_client, refs #1959
2022-12-17 13:47:55 -08:00
Simon Willison
31d6a0bc5e
Applied Black, refs #1922
2022-11-30 15:17:39 -08:00
Simon Willison
f0fadc28dd
Access-Control-Allow-Headers: Authorization, Content-Type - refs #1922
2022-11-30 15:11:18 -08:00
Simon Willison
2cd7ecaa0a
Apply Black, refs #1922
2022-11-30 13:54:47 -08:00
Simon Willison
6bfd71f5c6
Access-Control-Allow-Methods: GET, POST, HEAD, OPTIONS - refs #1922
2022-11-30 12:25:12 -08:00
Simon Willison
48725bb4ea
CORS headers for write APIs, refs #1922
2022-11-30 09:27:10 -08:00
Simon Willison
93a02281da
Show interrupted query in resizing textarea, closes #1876
2022-11-01 10:38:24 -07:00
Simon Willison
c35859ae3d
API for bulk inserts, closes #1866
2022-10-29 23:03:45 -07:00
Simon Willison
382a871583
max_signed_tokens_ttl setting, closes #1858
...
Also redesigned token format to include creation time and optional duration.
2022-10-26 20:14:59 -07:00
Simon Willison
c7956eed77
datasette create-token command, refs #1859
2022-10-25 21:26:12 -07:00
Simon Willison
5f9f567acb
Show SQL query when reporting time limit error, closes #1819
2022-09-26 16:06:01 -07:00
Simon Willison
d0737e4de5
truncate_cells_html now affects URLs too, refs #1805
2022-09-06 16:50:43 -07:00
Simon Willison
ba35105eee
Test `--load-extension` in GitHub Actions ( #1792 )
...
* Run the --load-extension test, refs #1789
* Ran cog, refs #1789
2022-08-23 17:11:45 -07:00
Simon Willison
b9c2b1cfc8
Consistent treatment of format in route capturing, refs #1667
...
Also refs #1660
2022-03-19 13:29:10 -07:00
Simon Willison
4e47a2d894
Fixed bug where tables with a column called n caused 500 errors
...
Closes #1228
2022-03-18 18:37:54 -07:00
Simon Willison
9979dcd07f
Also remove default_cache_ttl_hashed setting, refs #1661
2022-03-18 17:25:14 -07:00
Simon Willison
d4f60c2388
Remove hashed URL mode
...
Also simplified how view class routing works.
Refs #1661
2022-03-18 17:12:03 -07:00
Simon Willison
a35393b29c
Tilde encoding ( #1659 )
...
Closes #1657
Refs #1439
2022-03-15 11:01:57 -07:00
Simon Willison
1baa030eca
Switch to dash encoding for table/database/row-pk in paths
...
* Dash encoding functions, tests and docs, refs #1439
* dash encoding is now like percent encoding but with dashes
* Use dash-encoding for row PKs and ?_next=, refs #1439
* Use dash encoding for table names, refs #1439
* Use dash encoding for database names, too, refs #1439
See also https://simonwillison.net/2022/Mar/5/dash-encoding/
2022-03-07 07:38:29 -08:00
Simon Willison
ac239d34ab
Refactor test_trace into separate test module, refs #1576
2022-02-04 20:45:13 -08:00
Simon Willison
3ef47a0896
Link rel=alternate header for tables and rows
...
Also added Access-Control-Expose-Headers: Link to --cors mode.
Closes #1533
Refs https://github.com/simonw/datasette-notebook/issues/2
LL# metadata.json.1
2022-02-01 23:49:09 -08:00
Simon Willison
58652dd925
Hidden tables sqlite1/2/3/4, closes #1587
2022-01-19 20:12:46 -08:00
Simon Willison
5fac26aa22
Another populate_schema_tables optimization, refs #1555
2021-12-19 12:54:12 -08:00
Simon Willison
f65817000f
Include count in execute_write_many traces, closes #1571
2021-12-19 12:30:34 -08:00
Simon Willison
d637ed4676
Use execute_write_many to optimize internal DB, refs #1555 , #1570
2021-12-18 11:11:08 -08:00
Simon Willison
2e4ba71b53
Optimize create table calls using executescript=True
...
Refs #1555 , #1569
2021-12-18 10:34:15 -08:00
Simon Willison
f81d9d0cd9
Trace write SQL queries in addition to read ones, closes #1568
2021-12-17 18:42:29 -08:00
Simon Willison
492f9835aa
Refactor table view API tests to test_table_api.py
...
Refs #1518
2021-12-11 19:07:19 -08:00
Simon Willison
ca66246438
Updated JSON foreign key tables test for #1525
2021-11-29 22:45:04 -08:00
Simon Willison
69244a617b
Rename city_id to _city_id in fixtures, refs #1525
2021-11-29 22:20:42 -08:00
Simon Willison
c306b696de
Correct facet links for columns with a leading underscore, closes #1506
2021-11-13 20:44:54 -08:00
Simon Willison
8584993529
--cors Access-Control-Allow-Headers: Authorization
...
Refs #1467 , refs https://github.com/simonw/datasette-auth-tokens/issues/4
2021-10-14 12:03:28 -07: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
ca4f83dc7b
Rename config= to settings=, refs #1432
2021-08-12 18:10:36 -07:00