Simon Willison
5c64af6936
Upgrade to latest Black, closes #2239
2024-01-30 19:55:26 -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
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
4c25b035b2
arraynotcontains filter, closes #1132
2020-12-07 14:41:03 -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
fcatus
2d7fa8b905
Use None as a default arg ( #901 )
...
Thanks, @fcatus!
* Use None as a default arg
* Black formatting fix
Co-authored-by: Simon Willison <swillison@gmail.com>
2020-07-31 11:42:38 -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
f069950a14
Removed obsolete __init__ method
2019-05-27 19:03:36 -07:00
Simon Willison
de4503a136
Fix ?col__date= for columns with spaces
2019-05-20 22:36:56 -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
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