-
-
Notifications
You must be signed in to change notification settings - Fork 813
Closed
Description
I meant to add this as part of the facets plugin mechanism but didn't quite get to it. Original idea was to allow plugins to register extra filters, as seen in datasette/filters.py:
datasette/datasette/filters.py
Lines 83 to 98 in 2600858
| class Filters: | |
| _filters = ( | |
| [ | |
| # key, display, sql_template, human_template, format=, numeric=, no_argument= | |
| TemplatedFilter( | |
| "exact", | |
| "=", | |
| '"{c}" = :{p}', | |
| lambda c, v: "{c} = {v}" if v.isdigit() else '{c} = "{v}"', | |
| ), | |
| TemplatedFilter( | |
| "not", | |
| "!=", | |
| '"{c}" != :{p}', | |
| lambda c, v: "{c} != {v}" if v.isdigit() else '{c} != "{v}"', | |
| ), |
Reactions are currently unavailable