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
d1d78ec0eb
Better docs for startup() hook
2023-06-23 13:06:35 -07:00
Simon Willison
0b4a286914
render_cell(..., request) argument, closes #2007
2023-01-27 19:34:14 -08:00
Simon Willison
6a352e99ab
Added missing import to example
2023-01-11 11:04:11 -08:00
Simon Willison
deb5fcbed4
Fixed table_action example in docs
2023-01-04 10:25:04 -08:00
Simon Willison
63fb750f39
Replace AsgiLifespan with AsgiRunOnFirstRequest, refs #1955
2022-12-17 14:14:34 -08:00
Simon Willison
0b68996cc5
Revert "Replace AsgiLifespan with AsgiRunOnFirstRequest, refs #1955"
...
This reverts commit dc18f62089
.
2022-12-15 13:06:45 -08:00
Simon Willison
dc18f62089
Replace AsgiLifespan with AsgiRunOnFirstRequest, refs #1955
2022-12-15 09:34:07 -08:00
Simon Willison
8bf06a76b5
register_permissions() plugin hook ( #1940 )
...
* Docs for permissions: in metadata, refs #1636
* Refactor default_permissions.py to help with implementation of #1636
* register_permissions() plugin hook, closes #1939 - also refs #1938
* Tests for register_permissions() hook, refs #1939
* Documentation for datasette.permissions, refs #1939
* permission_allowed() falls back on Permission.default, refs #1939
* Raise StartupError on duplicate permissions
* Allow dupe permisisons if exact matches
2022-12-12 18:05:54 -08:00
Simon Willison
cab5b60e09
datasette-auth-passwords is another actor_from_request example
2022-12-02 08:39:52 -08:00
Simon Willison
b6ba117b79
Clarify request or None for two hooks
2022-10-04 18:25:52 -07:00
Simon Willison
4218c9cd74
reST markup fix
2022-10-04 11:45:36 -07:00
Simon Willison
7fb4ea4e39
Update note about render_cell signature, refs #1826
2022-09-27 21:06:40 -07:00
Simon Willison
ddc999ad12
Async support for prepare_jinja2_environment, closes #1809
2022-09-16 20:38:24 -07:00
Simon Willison
b40872f5e5
prepare_jinja2_environment(datasette) argument, refs #1809
2022-09-14 14:31:54 -07:00
Simon Willison
09a41662e7
Fix typo
2022-08-18 09:10:48 -07:00
Simon Willison
a107e3a028
datasette-sentry is an example of handle_exception
2022-08-14 16:07:46 -07:00
Simon Willison
ed1ebc0f1d
Run blacken-docs, refs #1770
2022-07-17 18:03:33 -07:00
Simon Willison
58fd1e33ec
Hint that you can render templates for these hooks, refs #1770
2022-07-17 16:30:58 -07:00
Simon Willison
c09c53f345
New handle_exception plugin hook, refs #1770
...
Also refs:
- https://github.com/simonw/datasette-sentry/issues/1
- https://github.com/simonw/datasette-show-errors/issues/2
2022-07-17 16:24:39 -07:00
Simon Willison
6373bb3414
Expose current SQLite row to render_cell hook, closes #1300
2022-07-07 09:30:49 -07:00
Simon Willison
1d33fd03b3
Switch docs theme to Furo, refs #1746
2022-05-20 13:34:51 -07:00
Simon Willison
0e2f6f1f82
datasette-copyable is an example of register_output_renderer
2022-05-18 17:37:46 -07:00
Simon Willison
c101f0efee
datasette-total-page-time example of asgi_wrapper
2022-04-26 15:34:29 -07:00
Simon Willison
7463b051cf
Cosmetic tweaks after blacken-docs, refs #1718
2022-04-24 09:59:20 -07:00
Simon Willison
92b26673d8
Fix blacken-docs errors and warnings, refs #1718
2022-04-24 09:03:14 -07:00
Simon Willison
8338c66a57
datasette-geojson is an example of register_output_renderer
2022-04-21 11:05:43 -07:00
Simon Willison
6b99e4a66b
Added missing hookimpl import
...
Useful for copying and pasting to create a quick plugin
2022-03-25 16:44:35 -07:00
Simon Willison
7d24fd405f
datasette-auth-passwords is now an example of register_commands
...
Refs https://github.com/simonw/datasette-auth-passwords/issues/19
2022-02-09 09:47:54 -08:00
Simon Willison
9b83ff2ee4
Fixed spelling of "raise"
2022-02-05 22:46:33 -08:00
Simon Willison
8a25ea9bca
Implemented import shortcuts, closes #957
2022-02-05 22:34:33 -08:00
Simon Willison
8c401ee0f0
Fixed remaining code and docs for new block=True default, closes #1579
2021-12-23 11:18:20 -08:00
Simon Willison
0c91e59d2b
datasette-leaflet-freedraw is an example of filters_from_request
2021-12-17 15:55:06 -08:00
Simon Willison
aa7f0037a4
filters_from_request plugin hook, now used in TableView
...
- New `filters_from_request` plugin hook, closes #473
- Used it to extract the logic from TableView that handles `_search` and
`_through` and `_where` - refs #1518
Also needed for this plugin work: https://github.com/simonw/datasette-leaflet-freedraw/issues/7
2021-12-17 11:02:14 -08:00
Simon Willison
95d0dd7a1c
Fix for colliding facet types bug, closes #625
...
Refs #830
2021-12-16 12:12:04 -08:00
Simon Willison
67cbf0ae72
Example for register_commands, refs #1449
2021-08-28 04:17:03 -07:00
Simon Willison
50c35b66a4
Added missing space
2021-08-28 04:14:38 -07:00
Simon Willison
d3ea367131
Release 0.59a2
...
Refs #942 , #1421 , #1423 , #1431 , #1443 , #1446 , #1449
2021-08-27 18:55:54 -07:00
Simon Willison
30c18576d6
register_commands() plugin hook, closes #1449
2021-08-27 18:39:42 -07:00
Simon Willison
3bb6409a6c
render_cell() can now return an awaitable, refs
2021-08-08 16:05:00 -07:00
Simon Willison
de5ce2e563
datasette-pyinstrument
2021-08-08 10:37:51 -07:00
Simon Willison
6dd14a1221
Improved links to example plugins
2021-08-06 22:38:47 -07:00
Simon Willison
2208c3c68e
Spelling corrections plus CI job for codespell
...
* Use codespell to check spelling in documentation, refs #1417
* Fixed spelling errors spotted by codespell, closes #1417
* Make codespell a docs dependency
See also this TIL: https://til.simonwillison.net/python/codespell
2021-08-03 09:36:38 -07:00
Simon Willison
a679d0de87
Fixed spelling of 'receive' in a bunch of places
2021-08-03 09:11:18 -07:00
Simon Willison
eccfeb0871
register_routes() plugin hook datasette argument, closes #1404
2021-07-26 16:16:46 -07:00
Simon Willison
e27dd7c12c
Release 0.58
...
Refs #1365 , #1371 , #1377 , #1384 , #1387 , #1388 , #1389 , #1394
2021-07-14 17:33:04 -07:00
Simon Willison
7ea678db22
Warn about potential changes to get_metadata hook, refs #1384
2021-07-14 17:19:31 -07:00
Simon Willison
ea627baccf
Removed fallback parameter from get_metadata, refs #1384
2021-06-26 17:02:42 -07:00
Simon Willison
0d339a4897
Removed text about executing SQL, refs #1384
2021-06-26 16:04:39 -07:00
Simon Willison
089278b8db
rST fix, refs #1384
2021-06-26 15:49:07 -07:00