You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Django-Filter is a mature and stable package. It uses a two-part CalVer
versioning scheme, such as 21.1. The first number is the year. The second
is the release number within that year.
On an on-going basis, Django-Filter aims to support all current Django
versions, the matching current Python versions, and the latest version of
Django REST Framework.
Support for Python and Django versions will be dropped when they reach
end-of-life. Support for Python versions will be dropped when they reach
end-of-life, even when still supported by a current version of Django.
Other breaking changes are rare. Where required, every effort will be made to
apply a "Year plus two" deprecation period. For example, a change initially
introduced in 23.x would offer a fallback where feasible and finally be
removed in 25.1. Where fallbacks are not feasible, breaking changes without
deprecation will be called out in the release notes.
Installation
Install using pip:
pip install django-filter
Then add 'django_filters' to your INSTALLED_APPS.
INSTALLED_APPS= [
...
'django_filters',
]
Usage
Django-filter can be used for generating interfaces similar to the Django
admin's list_filter interface. It has an API very similar to Django's
ModelForms. For example, if you had a Product model you could have a
filterset for it with the code: