Wykres commitów

31 Commity (main)

Autor SHA1 Wiadomość Data
Simon Willison feddd61789 Fix tests I broke in #2302 2024-03-12 17:01:51 -07: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 9c43b4164d Removed @pytest.mark.ds_client mark - refs #1959
I don't need it - can run 'pytest -k ds_client' instead.

See https://github.com/simonw/datasette/pull/1960#issuecomment-1355685828
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 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 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 c7956eed77 datasette create-token command, refs #1859 2022-10-25 21:26:12 -07:00
Simon Willison c23fa850e7 allow_signed_tokens setting, closes #1856 2022-10-25 19:55:47 -07:00
Simon Willison 0f013ff497 Mechanism to prevent tokens creating tokens, closes #1857 2022-10-25 19:43:55 -07:00
Simon Willison b29e487bc3 actor_from_request for dstok_ tokens, refs #1852 2022-10-25 19:18:41 -07:00
Simon Willison 7ab091e8ef Tests and docs for /-/create-token, refs #1852 2022-10-25 19:04:05 -07:00
Simon Willison 687907aa2b Remove python-baseconv dependency, refs #1733, closes #1734 2022-05-02 12:39:06 -07:00
Simon Willison b267b57754
Upgrade to httpx 0.20
* Upgrade to httpx 0.20, closes #1488
* TestClient.post() should not default to following redirects
2021-10-14 11:03:44 -07:00
Miroslav Šedivý a882d67962
Modernize code to Python 3.6+ (#1158)
* Compact dict and set building
* Remove redundant parentheses
* Simplify chained conditions
* Change method name to lowercase
* Use triple double quotes for docstrings

Thanks, @eumiro!
2020-12-23 09:04:32 -08:00
Simon Willison 30e64c8d3b
Use f-strings in place of .format()
Code transformed like so:

    pip install flynt
    flynt .
    black .
2020-11-15 15:24:22 -08:00
Simon Willison 18a64fbb29
Navigation menu plus menu_links() hook
Closes #1064, refs #690.
2020-10-29 20:45:15 -07:00
Simon Willison 8f97b9b58e
datasette.client internal requests mechanism
Closes #943

* Datasette now requires httpx>=0.15
* Support OPTIONS without 500, closes #1001
* Added internals tests for datasette.client methods
* Datasette's own test mechanism now uses httpx to simulate requests
* Tests simulate HTTP 1.1 now
* Added base_url in a bunch more places
* Mark some tests as xfail - will remove that when new httpx release ships: #1005
2020-10-09 09:11:24 -07:00
Simon Willison a648bb82ba Upgrade to Black 20.8b1, closes #958 2020-09-02 15:24:55 -07:00
Simon Willison 1bae24691f Only show 'log out' if ds_cookie present, closes #884 2020-07-01 14:25:59 -07:00
Simon Willison 2115d7e345 Logout link in nav, refs #875 2020-06-29 11:40:40 -07:00
Simon Willison 51427323e6 Add message when user logs out, refs #840 2020-06-29 11:31:35 -07:00
Simon Willison 22d932fafc /-/logout page for logging out of ds_actor cookie
Refs #840
2020-06-28 21:17:58 -07:00
Simon Willison 0e49842e22 datasette/actor_auth_cookie.py coverae to 100%, refs #841 2020-06-13 11:29:14 -07:00
Simon Willison 57e812d5de ds_author cookie can now expire, closes #829
Refs https://github.com/simonw/datasette-auth-github/issues/62#issuecomment-642152076
2020-06-10 12:39:54 -07:00
Simon Willison 7633b9ab24 unauthenticated: true method plus allow block docs, closes #825 2020-06-09 10:01:03 -07:00
Simon Willison 86dec9e8ff Added permission check to every view, closes #808 2020-06-06 22:30:36 -07:00
Simon Willison 4fa7cf6853 Flash messages mechanism, closes #790 2020-06-02 14:12:18 -07:00
Simon Willison dfdbdf378a Added /-/permissions debug tool, closes #788
Also started the authentication.rst docs page, refs #786.

Part of authentication work, refs #699.
2020-05-31 22:00:36 -07:00
Simon Willison 9f3d4aba31 --root option and /-/auth-token view, refs #784 2020-05-31 18:16:42 -07:00