Wykres commitów

452 Commity (59a5d336bd4336bc53103922ada4bf726f4336c9)

Autor SHA1 Wiadomość Data
Simon Willison 59a5d336bd Configured and applied isort, refs #516 2023-08-22 19:07:10 -07:00
Alex Garcia 17ec309e14
Start datasette.json, re-add --config, rm settings.json
The first step in defining the new `datasette.json/yaml` configuration mechanism.

Refs #2093, #2143, #493
2023-08-22 18:26:11 -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 18dd88ee4d Refactored DatabaseDownload to database_download, closes #2116 2023-07-26 11:43:55 -07:00
Simon Willison 2fd871a906 Drop support for Python 3.7, refs #2097 2023-07-08 11:40:19 -07:00
Simon Willison dda99fc09f
New View base class (#2080)
* New View base class, closes #2078
* Use new View subclass for PatternPortfolioView
2023-05-25 17:18:43 -07:00
Simon Willison d97e82df3c
?_extra= support and TableView refactor to table_view
* Implemented ?_extra= option for JSON views, refs #262
* New dependency: asyncinject
* Remove now-obsolete TableView class
2023-03-22 15:49:39 -07:00
Simon Willison 50fd94e04f Raise ValueError if Datasette(files=) is a string, refs #1985 2023-01-11 10:13:20 -08:00
Simon Willison c41278b46f default_allow_sql setting, closes #1409
Refs #1410
2023-01-04 16:51:26 -08:00
Simon Willison 8aa9cf629c Store null instead of 'None' in _internal database table, closes #1970 2022-12-31 10:52:37 -08:00
Simon Willison 8b73fc6b47 Put AsgiLifestyle back so server starts up again, refs #1955 2022-12-17 17:22:00 -08:00
Simon Willison 63fb750f39 Replace AsgiLifespan with AsgiRunOnFirstRequest, refs #1955 2022-12-17 14:14:34 -08:00
Simon Willison d94d363ec0 Don't use pytest_asyncio.fixture(scope="session") any more, refs #1959
Also got rid of the weird memory=False hack:

https://github.com/simonw/datasette/pull/1960#issuecomment-1354053151
2022-12-17 13:47:55 -08:00
Simon Willison 425ac4357f Ported app_client to ds_client where possible in test_auth.py, refs #1959 2022-12-17 13:47:55 -08:00
Simon Willison b077e63dc6 Ported test_api.py app_client test to ds_client, refs #1959 2022-12-17 13:47:55 -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 d98a8effb1 UI for restricting permissions on /-/create-token, refs #1947
Also fixes test failures I introduced in #1951
2022-12-13 21:03:17 -08:00
Simon Willison fdf7c27b54 datasette.create_token() method, closes #1951 2022-12-13 18:42:01 -08:00
Simon Willison c6a811237c /-/actor.json no longer requires view-instance, closes #1945 2022-12-12 20:11:51 -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 272982e8a6
/db/table/-/upsert API
Close #1878

Also made a few tweaks to how _r works in tokens and actors,
refs #1855 - I needed that mechanism for the tests.
2022-12-07 17:12:15 -08:00
Simon Willison 6b47734c04 _memory database should not be mutable, closes #1917 2022-11-29 21:06:52 -08:00
Simon Willison 484bef0d3b /db/table/pk/-/update endpoint, closes #1863 2022-11-29 10:06:19 -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 187d91d686 /db/-/create API endpoint, closes #1882 2022-11-14 21:57:28 -08:00
Simon Willison 000eeb4464 Link to Datasette API docs from /-/api, refs #1871 2022-11-01 22:45:05 -07:00
Simon Willison 00632ded30 Initial attempt at /db/table/row/-/delete, refs #1864 2022-10-30 16:16:00 -07:00
Simon Willison 2865d3956f /db/table/-/drop API, closes #1874 2022-10-30 15:17:21 -07:00
Simon Willison f6bf2d8045 Initial prototype of API explorer at /-/api, refs #1871 2022-10-29 23:20:11 -07:00
Simon Willison c35859ae3d API for bulk inserts, closes #1866 2022-10-29 23:03:45 -07:00
Simon Willison 6e788b49ed New URL design /db/table/-/insert, refs #1851 2022-10-27 13:18:05 -07:00
Simon Willison 382a871583 max_signed_tokens_ttl setting, closes #1858
Also redesigned token format to include creation time and optional duration.
2022-10-26 20:14:59 -07:00
Simon Willison 55f860c304 Fix bug with breadcrumbs and request=None, closes #1849 2022-10-26 20:14:59 -07:00
Simon Willison c23fa850e7 allow_signed_tokens setting, closes #1856 2022-10-25 19:55:47 -07:00
Simon Willison 42f8b402e6 Initial prototype of create API token page, refs #1852 2022-10-25 17:07:58 -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 1a5e5f2aa9 Refactor breadcrumbs to respect permissions, refs #1831 2022-10-13 14:42:52 -07:00
Simon Willison b7fec7f902 .sqlite/.sqlite3 extensions for config directory mode
Closes #1646
2022-10-07 16:03:30 -07:00
Simon Willison cb1e093fd3 Fixed error message, closes #1816 2022-09-19 18:15:40 -07:00
Simon Willison df851c117d Validate settings.json keys on startup, closes #1816
Refs #1814
2022-09-19 16:46:39 -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 d80775a48d Raise error if it's not about loops, refs #1802 2022-09-06 08:29:07 -07:00
Simon Willison 64288d827f
Workaround for test failure: RuntimeError: There is no current event loop (#1803)
* Remove ensure_eventloop hack
* Hack to recover from intermittent RuntimeError calling asyncio.Lock()
2022-09-05 17:40:19 -07:00
Simon Willison fd1086c686 Applied Black, refs #1789 2022-08-23 11:35:41 -07:00
Alex Garcia 1d64c9a8da
Add new entrypoint option to --load-extensions. (#1789)
Thanks, @asg017
2022-08-23 11:34:30 -07:00
Chris Amico 01369176b0
Keep track of datasette.config_dir (#1766)
Thanks, @eyeseast - closes #1764
2022-07-17 18:12:45 -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 8188f55efc Rename handle_500 to handle_exception, refs #1770 2022-07-17 15:24:16 -07:00