Wykres commitów

111 Commity (bb12229794655abaa21a9aa691d1f85d34b6c45a)

Autor SHA1 Wiadomość Data
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
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