Simon Willison
a37ee74891
Correct link to _ prefix on row page, closes #1525
2021-11-29 22:34:31 -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
06762776f7
Fix for incorrect hidden for fields for _columns, refs #1527
2021-11-29 19:04:35 -08:00
Simon Willison
08947fa764
Fix more broken base_url links
...
Refs #1519 , #838
2021-11-20 11:03:08 -08:00
Simon Willison
fe687fd020
Fixed a whole bunch of broken base_url links
...
Refs #1519 , #838
2021-11-19 16:53:11 -08:00
Simon Willison
c617e1769e
Fixed test I broke with new repr() in ##1519
2021-11-19 15:13:17 -08:00
Simon Willison
ff0dd4da38
repr() method for Request, refs #1519
2021-11-19 12:29:37 -08:00
Simon Willison
6e971b4ac1
Test confirming plugins can over-ride default routes, closes #1517
2021-11-18 19:07:21 -08:00
Simon Willison
55024b5301
_facet_array no longer confused by duplicate array items, closes #448
2021-11-15 17:19:33 -08:00
Simon Willison
07044bd130
SQL view-friendly arraycontains/arraynotcontains implementation, refs #448
2021-11-15 15:41:07 -08:00
Simon Willison
1c13e1af06
Ensure query columns are included too, ref #1503
2021-11-13 21:08:33 -08:00
Simon Willison
c9e3cfecc8
Columns in filters now ignore ?_nocol, closes #1503
2021-11-13 20:53:00 -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
b50bf5d13f
Don't persist _next in hidden field, closes #1483
2021-10-13 14:08:06 -07:00
Simon Willison
875117c343
Fix bug with ?_next=x&_sort=rowid, closes #1470
2021-10-09 18:14:56 -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
30c18576d6
register_commands() plugin hook, closes #1449
2021-08-27 18:39:42 -07:00
Simon Willison
adb5b70de5
Show count of facet values if ?_facet_size=max, closes #1423
2021-08-16 11:56:32 -07:00
Simon Willison
ca4f83dc7b
Rename config= to settings=, refs #1432
2021-08-12 18:10:36 -07:00
Simon Willison
77f46297a8
Rename --help-config to --help-settings, closes #1431
2021-08-12 18:01:57 -07:00
Simon Willison
e837095ef3
Column metadata, closes #942
2021-08-12 16:53:23 -07:00
Simon Willison
b1fed48a95
derive_named_parameters falls back to regex on SQL error, refs #1421
2021-08-08 20:26:08 -07:00
Simon Willison
fc4846850f
New way of deriving named parameters using explain, refs #1421
2021-08-08 20:21:13 -07:00
Simon Willison
f3c9edb376
Fixed some tests I broke in #1425
2021-08-08 16:11:40 -07:00
Simon Willison
818b0b76a2
Test table render_cell async as well as query results, refs #1425
2021-08-08 16:07:52 -07:00
Simon Willison
3bb6409a6c
render_cell() can now return an awaitable, refs
2021-08-08 16:05:00 -07:00
Simon Willison
66e143c76e
New hide_sql canned query option, refs #1422
2021-08-06 22:17:36 -07:00
Simon Willison
a1f3830356
--cpu option for datasette publish cloudrun, closes #1420
2021-08-03 22:20:50 -07:00
Simon Willison
a679d0de87
Fixed spelling of 'receive' in a bunch of places
2021-08-03 09:11:18 -07:00
Simon Willison
4adca0d850
No hidden SQL on canned query pages, closes #1411
2021-07-31 17:58:11 -07:00
Simon Willison
ff253f5242
Replace all uses of runner.isolated_filesystem, refs #1406
2021-07-31 11:49:08 -07:00
Simon Willison
96b1d0b7b4
Attempted fix for too-long UDS bug in #1407
2021-07-31 11:48:33 -07:00
Simon Willison
b46856391d
pytest.mark.serial for any test using isolated_filesystem(), refs #1406
2021-07-30 16:46:41 -07:00
Simon Willison
e55cd9dc3f
Try passing a directory to isolated_filesystem(), refs #1406
2021-07-29 18:16:58 -07:00
Simon Willison
2b1c535c12
pytest.mark.serial for any test using isolated_filesystem(), refs #1406
2021-07-29 17:44:16 -07:00
Simon Willison
121e10c29c
Doumentation and test for utils.parse_metadata(), closes #1405
2021-07-29 16:30:12 -07:00
Simon Willison
eccfeb0871
register_routes() plugin hook datasette argument, closes #1404
2021-07-26 16:16:46 -07:00
Simon Willison
de2a106328
Ran Black, refs #1388
2021-07-10 16:46:49 -07:00
Simon Willison
180c7a5328
--uds option for binding to Unix domain socket, closes #1388
2021-07-10 16:37:30 -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
Simon Willison
05a312caf3
Applied Black, refs #1368
2021-06-26 15:25:28 -07:00
Brandon Roberts
baf986c871
New get_metadata() plugin hook for dynamic metadata
...
The following hook is added:
get_metadata(
datasette=self, key=key, database=database, table=table,
fallback=fallback
)
This gets called when we're building our metdata for the rest
of the system to use. We merge whatever the plugins return
with any local metadata (from metadata.yml/yaml/json) allowing
for a live-editable dynamic Datasette.
As a security precation, local meta is *not* overwritable by
plugin hooks. The workflow for transitioning to live-meta would
be to load the plugin with the full metadata.yaml and save.
Then remove the parts of the metadata that you want to be able
to change from the file.
* Avoid race condition: don't mutate databases list
This avoids the nasty "RuntimeError: OrderedDict mutated during
iteration" error that randomly happens when a plugin adds a
new database to Datasette, using `add_database`. This change
makes the add and remove database functions more expensive, but
it prevents the random explosion race conditions that make for
confusing user experience when importing live databases.
Thanks, @brandonrobertz
2021-06-26 15:24:54 -07:00
Simon Willison
02b19c7a9a
Removed rogue pdb=True, refs #1377
2021-06-23 15:50:48 -07:00
Simon Willison
b1fd24ac9f
skip_csrf(datasette, scope) plugin hook, refs #1377
2021-06-23 15:40:09 -07:00
Simon Willison
4a3e8561ab
Default 405 for POST, plus tests
2021-06-23 15:40:09 -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