This is a proposal for a new ListFilter subclass.
Currently, if you add a numeric field to list_filter, Django admin outputs all possible values of that field using AllValuesFieldListFilter. This can get ugly very quickly.
For example, in my case, I have an application that manages transactions (orders) from an ecommerce site, and saves the transaction value. I can't easily filter the values (hundreds of thousands of them).
I have two suggestions for a replacement, instead of outputting all available values for a numeric field:
- Output something similar to what DateFieldListFilter does, eg. "10 or less/more, 15 or less" and so on, depending on real values.
- A numeric input. These an be two inputs for a range, or a single input for a specific value. Looking at the ListFilter code, this would be a much more complex change.
Happy to hear your thoughts.