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
Simon Willison
3bb6409a6c
render_cell() can now return an awaitable, refs
2021-08-08 16:05:00 -07:00
Simon Willison
e0064ba7b0
Fixes for test_generated_columns_are_visible_in_datasette, refs #1391
2021-07-10 12:14:14 -07:00
Simon Willison
2e8d924cdc
Refactored generated_columns test, no longer in fixtures.db - refs #1391
2021-07-10 12:03:19 -07:00
Simon Willison
83f6799a96
searchmode: raw table metadata property, closes #1389
2021-07-10 11:33:08 -07:00
Chris Amico
a6c55afe8c
Ensure db.path is a string before trying to insert into internal database ( #1370 )
...
Thanks, @eyeseast
2021-06-21 08:57:38 -07:00
Simon Willison
ff29dd55fa
?_trace=1 now depends on trace_debug setting, closes #1359
2021-06-05 13:18:37 -07:00
Simon Willison
807de378d0
/-/databases and homepage maintain connection order, closes #1216
2021-06-01 20:10:15 -07:00
Simon Willison
0539bf0816
Don't execute facets/counts for _shape=array or object, closes #263
2021-06-01 19:53:00 -07:00
Simon Willison
fd368d3b2c
New _nocount=1 option, used to speed up CSVs - closes #1353
2021-06-01 09:12:32 -07:00
Simon Willison
8bde6c5461
Rename ?_nofacets=1 to ?_nofacet=1, refs #1353
2021-06-01 08:56:00 -07:00
Simon Willison
c5ae1197a2
?_nofacets=1 option, closes #1350
2021-05-30 22:39:14 -04:00
Simon Willison
f7d3e76fb3
Facets now execute ignoring ?_col and ?_nocol, fixes #1345
2021-05-30 22:31:14 -04:00
Simon Willison
f1c29fd6a1
?_col=/?_nocol= to show/hide columns on the table page
...
Closes #615
* Cog icon for hiding columns
* Show all columns cog menu item
* Do not allow hide column on primary keys
* Allow both ?_col= and ?_nocol=
* De-duplicate if ?_col= passed multiple times
* 400 error if user tries to ?_nocol= a primary key
* Documentation for ?_col= and ?_nocol=
2021-05-26 21:17:43 -07:00
Simon Willison
cc6774cbaa
Upgrade httpx and remove xfail from tests, refs #1005
2021-02-28 14:34:44 -08:00
Simon Willison
1600d2a3ec
Renamed /:memory: to /_memory, with redirects - closes #1205
2021-01-28 14:48:56 -08:00
Simon Willison
a5ede3cdd4
Fixed bug loading database called 'test-database (1).sqlite'
...
Closes #1181 .
Also now ensures that database URLs have special characters URL-quoted.
2021-01-24 21:13:05 -08:00
Miroslav Šedivý
a882d67962
Modernize code to Python 3.6+ ( #1158 )
...
* Compact dict and set building
* Remove redundant parentheses
* Simplify chained conditions
* Change method name to lowercase
* Use triple double quotes for docstrings
Thanks, @eumiro!
2020-12-23 09:04:32 -08:00
Simon Willison
6000d1a724
Fix for combining ?_search_x and ?_searchmode=raw, closes #1134
2020-12-09 11:56:44 -08:00
Simon Willison
4c25b035b2
arraynotcontains filter, closes #1132
2020-12-07 14:41:03 -08:00
Simon Willison
42efb799ea
Fixed invalid test for generated columns, refs #1119
2020-12-04 21:20:12 -08:00
Simon Willison
a45a3dff3e
Fix for OPTIONS request against /db, closes #1100
2020-12-02 16:49:55 -08:00
Simon Willison
17cbbb1f7f
generated_columns table in fixtures.py, closes #1119
2020-11-30 16:28:02 -08:00
Simon Willison
461670a0b8
Support for generated columns
...
* Support for generated columns, closes #1116
* Show SQLite version in pytest report header
* Use table_info() if SQLite < 3.26.0
* Cache sqlite_version() rather than re-calculate every time
* Adjust test_database_page for SQLite 3.26.0 or higher
2020-11-30 13:29:57 -08:00