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
95900b9d02
Port app_client to ds_client for most of test_html.py, refs #1959
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
013496862f
Try click.echo() instead
...
This ensures the URL is output correctly when running under Docker.
Closes #1958
2022-12-15 16:55:17 -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
8cac6ff301
Release 1.0a2
...
Refs #1636 , #1855 , #1878 , #1927 , #1937 , #1940 , #1947 , #1951
Closes #1953
2022-12-14 18:01:02 -08:00
Simon Willison
c094dde3ff
Extra permission rules for /-/create, closes #1937
2022-12-14 12:21:18 -08:00
Simon Willison
e238df3959
Handle non-initials in permission_allowed_actor_restrictions, closes #1956
2022-12-14 12:04:23 -08:00
Simon Willison
1a3dcf4943
Don't include _memory on /-/create-token, refs #1947
2022-12-13 21:19:31 -08:00
Simon Willison
420d0a0ee2
Tests for /-/create-token with restrictions, closes #1947
2022-12-13 21:13:20 -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
d4cc1374f4
Improved --help for create-token, refs #1947
2022-12-13 14:28:59 -08:00
Simon Willison
f84acae98e
Return 400 errors for ?_sort errors, closes #1950
2022-12-13 14:23:17 -08:00
Simon Willison
34ad574bac
Don't hard-code permissions in permission_allowed_actor_restrictions, refs #1855
2022-12-12 21:14:40 -08:00
Simon Willison
c13dada2f8
datasette --get --token option, closes #1946 , refs #1855
2022-12-12 20:36:42 -08:00
Simon Willison
e95b490d88
Move create-token command into cli.py, refs #1855
2022-12-12 20:18:42 -08:00
Simon Willison
9cc1a7c4c8
create-token command can now create restricted tokens, refs #1855
2022-12-12 20:15:56 -08:00
Simon Willison
c6a811237c
/-/actor.json no longer requires view-instance, closes #1945
2022-12-12 20:11:51 -08:00
Simon Willison
3e6a208ba3
Rename 't' to 'r' in '_r' actor format, refs #1855
2022-12-12 19:27:34 -08:00
Simon Willison
c5d30b58a1
Implemented metadata permissions: property, closes #1636
2022-12-12 18:40:45 -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
dee18ed8ce
test_create_table_error_rows_twice_with_duplicates, refs #1927
2022-12-07 17:29:24 -08:00
Simon Willison
9342b60f14
test_create_table_error_if_pk_changed, refs #1927
2022-12-07 17:27:01 -08:00
Simon Willison
6b27537988
ignore/replace to create requires pk, refs #1927
2022-12-07 17:18:40 -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
93ababe6f7
Initial attempt at insert/replace for /-/create, refs #1927
2022-12-02 23:00:18 -08:00
Simon Willison
692fbfc40a
Release 1.0a1
...
Refs #1922 , #1917 , #1915 , #1916 , #1918 , #1924
2022-12-01 13:30:39 -08:00
Simon Willison
9a1536b52a
Move CORS headers into base class, refs #1922
2022-11-30 15:48:32 -08:00
Simon Willison
f0fadc28dd
Access-Control-Allow-Headers: Authorization, Content-Type - refs #1922
2022-11-30 15:11:18 -08:00
Simon Willison
6bfd71f5c6
Access-Control-Allow-Methods: GET, POST, HEAD, OPTIONS - refs #1922
2022-11-30 12:25:12 -08:00
Simon Willison
48725bb4ea
CORS headers for write APIs, refs #1922
2022-11-30 09:27:10 -08:00
Simon Willison
8404b21556
405 method not allowed for GET to POST endpoints, closes #1916
2022-11-29 21:15:13 -08:00
Simon Willison
5518397338
Show mutable DBs first in API explorer, closes #1918
2022-11-29 21:07:51 -08:00
Simon Willison
6b47734c04
_memory database should not be mutable, closes #1917
2022-11-29 21:06:52 -08:00
Simon Willison
b8fc8e2cd7
Merge branch 'main' into 1.0-dev
2022-11-29 11:34:39 -08:00
Simon Willison
4d49a5a397
Release 1.0a0
...
Refs #1850 , #1851 , #1852 , #1856 , #1858 , #1863 , #1864 , #1871 , #1874 , #1882
Closes #1891
2022-11-29 11:22:54 -08:00
Simon Willison
1154048f79
Compound primary key support for /db/-/create - closes #1911
...
Needed for tests in #1864
2022-11-29 10:47:48 -08:00
Simon Willison
484bef0d3b
/db/table/pk/-/update endpoint, closes #1863
2022-11-29 10:06:19 -08:00
Simon Willison
21f8aab531
Release 0.63.2
...
Refs #1904 , #1905
2022-11-18 16:59:05 -08:00
Simon Willison
733447d7c7
Upgrade to Python 3.11 on Heroku, refs #1905
2022-11-18 16:44:46 -08:00
Simon Willison
72ac9bf82f
--generate-dir option to publish heroku, refs #1905
2022-11-18 16:34:33 -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
Brian Grinstead
3ecd131e57
Use DOMContentLoaded instead of load event for CodeMirror initialization. Closes #1894 ( #1898 )
2022-11-17 23:29:00 -08:00
Simon Willison
63f923d013
Remove min-height on CodeMirror, closes #1899
2022-11-17 23:21:00 -08:00
Simon Willison
3db37e9a21
Remove min-height on CodeMirror, closes #1899
2022-11-17 23:20:49 -08:00
Simon Willison
83a6872d1b
Include views in SQL autocomplete, refs #1897
2022-11-17 18:53:48 -08:00