Wykres commitów

98 Commity (6ccef35cc92cc2357c2b2a9aa003b7334b2459eb)

Autor SHA1 Wiadomość Data
Simon Willison 6ccef35cc9 More links between events documentation 2024-02-01 15:42:45 -08:00
Simon Willison b466749e88 Filled out docs/configuration.rst, closes #2246 2024-01-31 20:03:19 -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 959e020297 Ran blacken-docs 2024-01-30 20:40:18 -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 48148e66a8 Link from actors_from_ids plugin hook docs to datasette.actors_from_ids() 2024-01-10 10:42:36 -08:00
Simon Willison c7a4706bcc
jinja2_environment_from_request() plugin hook
Closes #2225
2024-01-05 14:33:23 -08:00
Simon Willison 85a41987c7 Fixed typo acepts -> accepts 2023-10-08 09:07:11 -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
Simon Willison ab040470e2 Applied blacken-docs 2023-09-07 15:57:27 -07:00
Simon Willison fbcb103c0c Added example code to database_actions hook documentation 2023-09-07 07:47:24 -07:00
Simon Willison 50da908213
Cascade for restricted token view-table/view-database/view-instance operations (#2154)
Closes #2102

* Permission is now a dataclass, not a namedtuple - refs https://github.com/simonw/datasette/pull/2154/#discussion_r1308087800
* datasette.get_permission() method
2023-08-29 09:32:34 -07:00
Simon Willison 943df09dcc Remove all remaining "$ " prefixes from docs, closes #2140
Also document sqlite-utils create-view
2023-08-11 10:44:34 -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 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