Wykres commitów

18 Commity (main)

Autor SHA1 Wiadomość Data
Simon Willison f99c2f5f8c ?column_notcontains= table filter, closes #2287 2024-02-27 16:07:41 -08: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 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 4a151b15cc ds_client for test_filters.py, refs #1959 2022-12-17 13:47:55 -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 aa7f0037a4
filters_from_request plugin hook, now used in TableView
- New `filters_from_request` plugin hook, closes #473
- Used it to extract the logic from TableView that handles `_search` and
`_through` and `_where` - refs #1518

Also needed for this plugin work: https://github.com/simonw/datasette-leaflet-freedraw/issues/7
2021-12-17 11:02:14 -08:00
Simon Willison 07044bd130 SQL view-friendly arraycontains/arraynotcontains implementation, refs #448 2021-11-15 15:41:07 -08:00
Simon Willison 726f781c50 Fix for arraycontains bug, closes #1239 2021-02-22 16:22:47 -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 a648bb82ba Upgrade to Black 20.8b1, closes #958 2020-09-02 15:24:55 -07:00
Simon Willison b3aa5f4313 Added 'not like' table filter, refs #750 2020-05-02 12:04:54 -07:00
Simon Willison 9db22cdf18 pk__notin= filter, closes #614 2019-11-03 20:11:55 -08:00
Simon Willison 2d14f21f85 Updated tests for date(...) lookup 2019-05-20 23:06:19 -07:00
Simon Willison 35d6ee2790
Apply black to everything, enforce via unit tests (#449)
I've run the black code formatting tool against everything:

    black tests datasette setup.py

I also added a new unit test, in tests/test_black.py, which will fail if the code does not
conform to black's exacting standards.

This unit test only runs on Python 3.6 or higher, because black itself doesn't run on 3.5.
2019-05-03 22:15:14 -04:00
Simon Willison 9c77e6e355 Support multiple filters of the same type
Closes #288
2019-04-15 16:44:17 -07:00
Simon Willison 583b22aa28 New ?column__date=yyyy-mm-dd filter 2019-04-15 15:54:54 -07:00
Simon Willison 1c6649b19b New colname__in=x,y,z filter, closes #433 2019-04-15 15:43:22 -07:00
Simon Willison 6da567dda9 Extract and refactor filters into filters.py
This will help in implementing __in as a filter, refs #433
2019-04-15 14:51:20 -07:00