- Fixes
date
lookup when using Django ORM. See #92.
- Using
CharField
forregex
filters. See #90. SQLAlchemyFilterBackend
does not join models if already join path is partially joined already.SQLAlchemyFilterBackend
joins whenselectinjoin
is used.
- Fixing iregex documentation in DRF coreapi integration.
- Adding support for
FilterSet.Meta.fields == '__all__'
which is useful in DRF integration. See #39.
- Not modifying queryset in Django backend if no filters were applied. See #73.
- Only running
distinct
on queryset when one of filters is on one-to-many relation. This should help with performance. See #26.
- Adding
iin
form field overwrite for SQLAlchemy as otherwise by defaultiin
lookup is not validated correctly.
- Fixed
SQLAlchemyFilterBackend
by not joining nested models when they are already eager loaded viaquery.options()
.
- Added
StrictModel.empty
which is new default. It returns empty queryset when any filter validations fail. - Fixed
in
lookup. Previously if any of the items were invalid whole filter would fail and depending on strict mode would either return all results, no results or will raise exception. Now inStrictMode.empty
andStrictMode.drop
any invalid items are ignored which will filter results for valid items. See #63. - Added ability in
ModelFilterSet
to customize filter names by providingextra_kwargs
with fieldsource
. See #66.
- Added support for
extra_kwargs
inModelFilterSet.Meta
. - Added
CoreAPIURLFilterBackend
which enables documented filters in swagger docs. - Added
iin
lookup in plain and sqlalchemy backends. - Fixing inconsistency between plain and Django
week_day
lookup. Now both are consistent with1
-Monday and7
-Sunday.
- Django 2 support.
- Using tox-travis for travis builds.
- Fixed negated queries in Django backend.
Previously negation did
NOT (condition1 and condition2)
vs expectedNOT condition1 and NOT condition2
. See #53.
- Py36 compatibility by switching to
enum-compat
fromenum34
- Improvement to
README
by including imports in code examples - Defaulting
SQLAlchemyModelFilterSet
to useSQLAlchemyFilterBackend
- Defaulting
PlainModelFilterSet
to usePlainFilterBackend
- Using universal wheels for distribution
- Fixed bug which did not allow to use SQLAlchemy backend fully
without having
django.contrib.contenttypes
in installed apps. See #36. - Improved SQLAlchemy versions compatibility.
- Added
URLFilterBackend
alias in DRF integration for backend to reduce confusion withDjangoFilterBackend
as in url filter core backend.
- Fixed plain backend to return list in Python 3 vs
filter()
generator which is not compatible with Django pagination since it requireslen()
to be implemented.
- Fixed bug where default filters were used in root filtersets. As a result additional querystring parameters were validation which broke other functionality such as pagination.
- Added plain objects filtering support. More in docs and GitHub issue #8.
- Added CallableFilter which allows to implement custom filters.
- Normalizing to DRF's
ValidationError
when usingStrictMode.Fail
since filterset raises Django'sValidationError
which caused 500 status code. - Fixes
ModelFilterSet
automatic introspection to ignoreGenericForeignKey
since they dont have form fields associated with them. See #20. - Releasing with wheels.
Added SQLAlchemy support.
FilterSet
instances have much more useful__repr__
which shows all filters at a glance. For example:>>> PlaceFilterSet() PlaceFilterSet() address = Filter(form_field=CharField, lookups=ALL, default_lookup="exact", is_default=False) id = Filter(form_field=IntegerField, lookups=ALL, default_lookup="exact", is_default=True) name = Filter(form_field=CharField, lookups=ALL, default_lookup="exact", is_default=False) restaurant = RestaurantFilterSet() serves_hot_dogs = Filter(form_field=BooleanField, lookups=ALL, default_lookup="exact", is_default=False) serves_pizza = Filter(form_field=BooleanField, lookups=ALL, default_lookup="exact", is_default=False) waiter = WaiterFilterSet() id = Filter(form_field=IntegerField, lookups=ALL, default_lookup="exact", is_default=True) name = Filter(form_field=CharField, lookups=ALL, default_lookup="exact", is_default=False)
- Fixed installation issue where not all subpackages were installed.
- First release on PyPI.