Commit graph

90 commits

Author SHA1 Message Date
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
Simon Willison
9e094b7c9d db.execute_write(executescript=True) option, closes #1569 2021-12-18 10:34:15 -08:00
Simon Willison
85c22f4fbc
Corrected Datasette(files=) example from #1563 2021-12-18 10:10:37 -08:00
Simon Willison
7c8f8aa209 Documentation for Datasette() constructor, closes #1563 2021-12-17 18:19:36 -08:00
Simon Willison
63886178a6
Describe a common mistake using csrftoken() 2021-09-22 15:44:28 -07:00
Simon Willison
b28b6cd2fe
Warn that execute_write_fn(fn) should be a non-async function 2021-09-12 13:13:52 -07:00
Simon Willison
7e15422aac Documentation for datasette.databases property, closes #1443 2021-08-19 14:23:43 -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
121e10c29c Doumentation and test for utils.parse_metadata(), closes #1405 2021-07-29 16:30:12 -07:00
Simon Willison
b1fd24ac9f skip_csrf(datasette, scope) plugin hook, refs #1377 2021-06-23 15:40:09 -07:00
Simon Willison
af5a7f1c09 Release 0.56
Refs #1005, #1031, #1141, #1229, #1236, #1239, #1246, #1247, #1252, #1266, #1276, #1278
2021-03-28 17:41:12 -07:00
Simon Willison
c4f1ec7f33 Documentation for Response.asgi_send(), closes #1266 2021-03-20 14:32:23 -07:00
Simon Willison
7c87532acc New .add_memory_database() method, closes #1247 2021-02-28 20:02:18 -08:00
Simon Willison
73bed17563
Corrected documentation for datasette.urls.static_plugins 2021-02-18 15:25:01 -08:00
Simon Willison
6f41c8a2be
--crossdb option for joining across databases (#1232)
* Test for cross-database join, refs #283
* Warn if --crossdb used with more than 10 DBs, refs #283
* latest.datasette.io demo of --crossdb joins, refs #283
* Show attached databases on /_memory page, refs #283
* Documentation for cross-database queries, refs #283
2021-02-18 14:09:12 -08:00
Simon Willison
b6a7b58fa0 Initial docs for _internal database, closes #1154 2021-01-24 16:08:29 -08:00
Simon Willison
649f48cd70 request.full_path property, closes #1184 2021-01-11 13:32:58 -08:00
Simon Willison
8919f99c2f Improved .add_database() method design
Closes #1155 - _internal now has a sensible name

Closes #509 - Support opening multiple databases with the same stem
2020-12-22 12:04:18 -08:00
Simon Willison
5e9895c67f Database(memory_name=) for shared in-memory databases, closes #1151 2020-12-17 17:01:18 -08:00
Simon Willison
a8e66f9065 Release 0.52
Refs #992, #1103, #1104, #1107, #1077, #1110, #1089, #1086, #1088, #1084
2020-11-28 15:54:35 -08:00
Simon Willison
f2e2bfcdd9 Renamed datasette.config() to .setting(), closes #1107 2020-11-24 14:06:32 -08:00
Simon Willison
5a77f7a649 Updated docs renaming config to settings
- config.html is now settings.html
- ConfigOption in app.py is now Setting
- updated documentation unit tests

Refs #1106
2020-11-24 13:22:33 -08:00
Simon Willison
5eb8e9bf25 Removed words that minimize involved difficulty, closes #1089 2020-11-12 12:07:19 -08:00
Simon Willison
84bc7244c1 datasette.client now applies base_url, closes #1026 2020-10-31 12:29:42 -07:00
Simon Willison
7a67bc7a56 datasette.urls methods will not apply base_url prefix twice, refs #1026 2020-10-31 12:11:40 -07:00
Simon Willison
11eb1e026f datasette.urls.table(..., format="json"), closes #1035
Also improved tests for datasette.urls and added format= to some other methods
2020-10-31 11:16:28 -07:00
Simon Willison
42f4851e3e Documentation for .absolute_url(request, path), refs #1034 2020-10-24 18:17:30 -07:00
Simon Willison
a96ad967e4 Cleaned up some rogue full-stops 2020-10-24 16:11:14 -07:00
Simon Willison
5a15197960
/db/table/-/blob/pk/column.blob download URL, refs #1036 2020-10-24 16:09:18 -07:00
Simon Willison
10c35bd371 urls.static_plugins() method, closes #1033
Also documented how to package static assets and templates in plugins, closes #575
2020-10-24 13:03:40 -07:00
Simon Willison
d3e9b0aecb Document render_template() can take a Template, refs #1045 2020-10-23 17:26:15 -07:00
Simon Willison
8148c9e265 Document render_template(templates) list, closes #1045 2020-10-23 17:22:00 -07:00
Simon Willison
0d1763fb2f More datasette.urls usage, refs #1025 2020-10-19 21:24:47 -07:00
Simon Willison
5aacc021b5 Docs for datasette.urls, closes #904 2020-10-19 17:51:39 -07:00
Simon Willison
549a007683
Clarify that datasette.client HTTP calls are simulated 2020-10-09 16:13:41 -07:00
Simon Willison
a61f0e4e15 Release 0.50
Refs #1001, #514, #891, #943, #969, #970, #978, #980, #996, #997

Closes #1002
2020-10-09 10:52:44 -07:00
Simon Willison
c12b7a5def Documentation for datasette.client, closes #1006
Refs #1000
2020-10-09 10:20:25 -07:00
Simon Willison
5a184a5d21 Display column type in column action menu, closes #993
Also added new documented db.table_column_details() introspection method.
2020-10-05 17:32:10 -07:00