Simon Willison
7818e8b9d1
Hide tables starting with an _, refs #2104
2024-03-07 00:03:42 -05:00
Simon Willison
090dff542b
Action menu descriptions
...
* Refactor tests to extract get_actions_links() helper
* Table, database and query action menu items now support optional descriptions
Closes #2294
2024-03-06 22:54:06 -05:00
Simon Willison
4d24bf6b34
Don't explain an explain even in the demo, refs #2293
2024-03-05 18:14:55 -08:00
Simon Willison
5de6797d4a
Better demo plugin for query_actions, refs #2293
2024-03-05 18:06:38 -08:00
Simon Willison
6ec0081f5d
`query_actions` plugin hook
...
* New query_actions plugin hook, closes #2283
2024-02-27 21:55:16 -08:00
Simon Willison
f99c2f5f8c
?column_notcontains= table filter, closes #2287
2024-02-27 16:07:41 -08:00
Jeroen Van Goey
103b4decbd
fix (typo): Corrected spelling of 'environments' ( #2268 )
...
* fix (typo): Corrected spelling of 'environments'
* ci: add test folder to codespell workflow
2024-02-19 14:41:32 -08:00
Simon Willison
28bf3a933f
Applied Black, refs #2278
2024-02-19 14:22:59 -08:00
Simon Willison
26300738e3
Fixes for permissions debug page, closes #2278
2024-02-19 14:17:37 -08:00
Simon Willison
b36a2d8f4b
Require update-row to use insert replace, closes #2279
2024-02-19 12:55:51 -08:00
Simon Willison
3856a8cb24
Consistent Permission denied:, refs #2279
2024-02-19 12:51:14 -08:00
Simon Willison
10f9ba1a00
Take advantage of execute_write_fn(transaction=True)
...
A bunch of places no longer need to do manual transaction handling
thanks to this change. Refs #2277
2024-02-17 20:51:19 -08:00
Simon Willison
5e0e440f2c
database.execute_write_fn(transaction=True) parameter, closes #2277
2024-02-17 20:28:15 -08:00
Simon Willison
3a999a85fb
Fire insert-rows on /db/-/create if rows were inserted, refs #2260
2024-02-16 13:59:56 -08:00
Simon Willison
244f3ff83a
Test demonstrating fix for permisisons bug in #2262
2024-02-16 13:39:57 -08:00
Simon Willison
398a92cf1e
Include database in name of _execute_writes thread, closes #2265
2024-02-08 20:12:31 -08:00
Simon Willison
c62cfa6de8
Fix upsert test to detect new alter-table event
2024-02-08 13:36:17 -08:00
Simon Willison
c954795f9a
alter: true for row/-/update, refs #2101
2024-02-08 13:36:17 -08:00
Simon Willison
4e944c29e4
Corrected path used in test_update_row_check_permission
2024-02-08 13:36:17 -08:00
Simon Willison
528d89d1a3
alter: true support for /-/insert and /-/upsert, refs #2101
2024-02-08 13:36:17 -08:00
Simon Willison
b5ccc4d608
Test for Permission denied - need alter-table
2024-02-08 13:36:17 -08:00
Simon Willison
900d15bcb8
alter table support for /db/-/create API, refs #2101
2024-02-08 13:36:17 -08:00
Simon Willison
9ac9f0152f
Migrate allow from metadata to config if necessary, closes #2249
2024-02-06 22:18:38 -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
52a1dac5d2
Test proving $env works for datasette.yml, closes #2255
2024-02-06 21:00:55 -08:00
Simon Willison
69c6e95323
Fixed a bunch of unused imports spotted with ruff
2024-02-06 17:27:20 -08:00
Simon Willison
5a63ecc557
Rename metadata= to table_config= in facet code, refs #2247
2024-02-06 15:03:19 -08:00
Simon Willison
1e901aa690
/-/config page, closes #2254
2024-02-06 12:33:46 -08:00
Simon Willison
be4f02335f
Treat plugins in metadata as if they were in config, closes #2248
2024-02-01 15:33:33 -08:00
Simon Willison
d4bc2b2dfc
Remove fail_if_plugins_in_metadata, part of #2248
2024-02-01 14:44:16 -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
5c64af6936
Upgrade to latest Black, closes #2239
2024-01-30 19:55:26 -08:00
Simon Willison
c3caf36af7
Template slot family of plugin hooks - top_homepage() and others
...
New plugin hooks:
top_homepage
top_database
top_table
top_row
top_query
top_canned_query
New datasette.utils.make_slot_function()
Closes #1191
2024-01-30 19:54:03 -08:00
Simon Willison
7a5adb592a
Docs on temporary plugins in fixtures, closes #2234
2024-01-12 14:12:14 -08:00
Simon Willison
a25bf6bea7
fmt: off to fix problem with Black, closes #2231
2024-01-10 14:12:20 -08:00
Simon Willison
7506a89be0
Docs on datasette.client for tests, closes #1830
...
Also covers ds.client.actor_cookie() helper
2024-01-10 13:04:34 -08:00
Simon Willison
2ff4d4a60a
Test for ?_extra=count, refs #262
2024-01-08 13:14:25 -08:00
Simon Willison
0b2c6a7ebd
Fix for ?_extra=columns bug, closes #2230
...
Also refs #262 - started a test suite for extras.
2024-01-08 13:12:57 -08:00
Simon Willison
c7a4706bcc
jinja2_environment_from_request() plugin hook
...
Closes #2225
2024-01-05 14:33:23 -08:00
Simon Willison
872dae1e1a
Fix for CSV labels=on missing foreign key bug, closes #2214
2023-12-22 15:08:11 -08:00
Simon Willison
4284c74bc1
db.execute_isolated_fn() method ( #2220 )
...
Closes #2218
2023-12-19 10:51:03 -08:00
Alex Garcia
3d6d1e3050
Raise an exception if a "plugins" block exists in metadata.json
2023-10-12 09:20:50 -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
b7cf0200e2
Swap order of config and metadata options, refs #2194
2023-09-21 13:22:40 -07:00
Simon Willison
80a9cd9620
test-datasette-load-plugins now fails correctly, refs #2193
2023-09-21 12:55:50 -07:00
Simon Willison
6ed7908580
Simplified test for #2189
...
This now executes two facets, in the hope that parallel facet execution
would illustrate the bug - but it did not illustrate the bug.
2023-09-18 10:44:13 -07:00
Simon Willison
f56e043747
test_facet_against_in_memory_database, refs #2189
...
This is meant to illustrate a crashing bug but it does not trigger it.
2023-09-18 10:39:11 -07:00
Simon Willison
852f501485
Switch from pkg_resources to importlib.metadata in app.py, refs #2057
2023-09-16 09:35:18 -07:00
Alex Garcia
b2ec8717c3
Plugin configuration now lives in datasette.yaml/json
...
* Checkpoint, moving top-level plugin config to datasette.json
* Support database-level and table-level plugin configuration in datasette.yaml
Refs #2093
2023-09-13 14:06:25 -07:00
Simon Willison
b645174271
actors_from_ids plugin hook and datasette.actors_from_ids() method ( #2181 )
...
* Prototype of actors_from_ids plugin hook, refs #2180
* datasette-remote-actors example plugin, refs #2180
2023-09-07 21:23:59 -07:00