This library provides filters similar in some ways to list_filter and date_hierarchy in Django's admin, but for use outside the admin. Importantly, it also includes result counts for the choices. It is designed to be very easy to get started with.
Just install as a Python library.
See the docs/ directory, especially docs/overview.rst
Also hosted here: http://packages.python.org/django-easyfilters And here: https://django-easyfilters.readthedocs.org/en/latest/
A small demo app is included, see the instructions in docs/develop.rst
A (currently) live example can be seen at:
The library is in a useful state and is used in production. Test coverage is extensive. Feedback regarding API or features is very welcome!
File bugs/feature request in the 'issues' in BitBucket:
- #11 Error on sql string with Postgres as DB and with AS clause into GROUP BY param (new)
- #10 Boolean fields choices not localized (new)
- #2 it's possible to write a filter by field in related object? (new)
- #9 Make django-easyfilters compatible with 1.6x? (new)
- #8 Choices count not always accurate (new)
- #7 Provide template in a file instead of an attribute on FilterSet (new)
- #4 filterlabel tightly-coupled to verbose_name (new)
Or drop me an email, I always like to hear when people are using my stuff.
- Possible: ability to specify 'defaults' attribute for FilterSet
- Allow the automatic 'page' resetting to be customized