Commit graph

128 commits

Author SHA1 Message Date
Alex Garcia
169ee5d710
Initial upgrade guide for v0.XX to v1 2024-08-05 10:35:38 -07:00
Simon Willison
d118d5c5bb named_parameters(sql) sync function, refs #2354
Also refs #2353 and #2352
2024-06-12 16:51:07 -07:00
Simon Willison
8f9509f00c
datasette, not self.ds, in internals documentation 2024-04-22 16:01:37 -07:00
Simon Willison
63714cb2b7 Fixed some typos spotted by Gemini Pro 1.5, closes #2318 2024-04-10 17:05:15 -07:00
Simon Willison
d32176c5b8
Typo fix triggera -> triggers 2024-04-10 16:50:09 -07:00
Simon Willison
c863443ea1 Documentation for derive_named_parameters()
Closes #2284

Refs https://github.com/simonw/datasette-write/issues/7#issuecomment-1967593883
2024-02-27 13:24:47 -08:00
Simon Willison
5e0e440f2c database.execute_write_fn(transaction=True) parameter, closes #2277 2024-02-17 20:28:15 -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
4284c74bc1
db.execute_isolated_fn() method (#2220)
Closes #2218
2023-12-19 10:51:03 -08: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
b0e5d8afa3
Stop using parallel SQL queries for tables
Refs:
- #2189
2023-09-20 15:10:55 -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
9cead33fb9
OperationalError: database table is locked fix
See also:
- https://til.simonwillison.net/datasette/remember-to-commit
2023-08-31 10:46:07 -07:00
Simon Willison
4c3ef03311
Another ReST fix 2023-08-30 16:19:59 -07:00
Simon Willison
2caa53a52a
ReST fix 2023-08-30 16:19:24 -07:00
Simon Willison
bb12229794 Rename core_ to catalog_, closes #2163 2023-08-29 10:01:28 -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
Alex Garcia
92b8bf38c0
Add new --internal internal.db option, deprecate legacy _internal database
Refs:
- #2157 
---------

Co-authored-by: Simon Willison <swillison@gmail.com>
2023-08-28 20:24:23 -07:00
Simon Willison
e054704fb6 Added missing rST label 2022-12-14 21:38:28 -08:00
Simon Willison
9ad76d279e Applied blacken-docs, refs #1937 2022-12-14 14:49:13 -08:00
Simon Willison
fdf7c27b54 datasette.create_token() method, closes #1951 2022-12-13 18:42:01 -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
ee64130fa8 Refactor to use new resolve_database/table/row methods, refs #1896 2022-11-18 14:46:25 -08:00
Simon Willison
c588a89f26 db.view_exists() method, needed by #1896 2022-11-18 14:16:38 -08:00
Simon Willison
2355067ef5 Tests now close SQLite database connections and files explicitly, refs #1843
Also added a db.close() method to the Database class.
2022-11-03 13:36:11 -07:00
Simon Willison
602c0888ce Release 0.63a1
Refs #1646, #1819, #1825, #1829, #1831, #1832, #1834, #1844, #1848
2022-10-23 20:07:09 -07:00
Simon Willison
78dad236df
check_visibility can now take multiple permissions into account
Closes #1829
2022-10-23 19:11:33 -07:00
Simon Willison
fb7e70d5e7 Database(is_mutable=) now defaults to True, closes #1808
Refs https://github.com/simonw/datasette-upload-dbs/issues/6
2022-09-09 09:19:20 -07:00
Simon Willison
5e6c5c9e31 Document datasette.config_dir, refs #1766 2022-08-14 10:18:47 -07:00
Simon Willison
adedd85b68
Clarify that request.headers names are converted to lowercase 2022-05-28 18:42:31 -07:00
Simon Willison
94a3171b01
.plugin_config() can return None 2022-04-28 13:29:11 -07:00
Simon Willison
92b26673d8 Fix blacken-docs errors and warnings, refs #1718 2022-04-24 09:03:14 -07:00
Simon Willison
90d1be9952 Tilde encoding now encodes space as plus, closes #1701
Refs #1657
2022-04-06 08:55:01 -07:00
Simon Willison
5c5e9b3657 Request.fake(... url_vars), plus .fake() is now documented
Also made 'from datasette import Request' shortcut work.

Closes #1697
2022-03-31 19:01:58 -07:00
Simon Willison
bd8a58ae61
Fix message_type in documentation, closes #1689 2022-03-26 13:51:20 -07:00
Simon Willison
1a7750eb29 Documented datasette.check_visibility() method, closes #1678 2022-03-21 12:01:37 -07:00
Simon Willison
e627510b76 BaseView.check_permissions is now datasette.ensure_permissions, closes #1675
Refs #1660
2022-03-21 10:13:16 -07:00
Simon Willison
7a6654a253 Databases can now have a .route separate from their .name, refs #1668 2022-03-19 17:11:17 -07:00
Simon Willison
30e5f0e67c
Documented internals used by datasette-hashed-urls
Closes #1663
2022-03-17 14:30:02 -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
d9b508ffaa @documented decorator plus unit test plus sphinx.ext.autodoc
New mechanism for marking datasette.utils functions that should be covered by the
documentation, then testing that they have indeed been documented.

Also enabled sphinx.ext.autodoc which can now be used to embed the documented
versions of those functions.

Refs #1176
2022-02-06 22:31:06 -08:00
Simon Willison
8a25ea9bca Implemented import shortcuts, closes #957 2022-02-05 22:34:33 -08:00
Simon Willison
d25b55ab5e Fixed rST warnings 2022-02-05 22:32:23 -08:00
Simon Willison
da53e0360d tracer.trace_child_tasks() for asyncio.gather tracing
Also added documentation for datasette.tracer module.

Closes #1576
2022-02-04 21:19:49 -08:00
Simon Willison
75153ea9b9 Updated db.execute_write_fn() docs for block=True default, refs #1579 2021-12-23 11:16:31 -08:00
Simon Willison
00a2895cd2 execute_write defaut is now block=True, closes #1579 2021-12-23 11:03:49 -08:00
Simon Willison
5cadc24489 db.execute_write_script() and db.execute_write_many(), closes #1570
Refs #1555
2021-12-18 10:57:22 -08:00