django-rest-framework-filters
django-rest-framework-filters copied to clipboard
Better filtering for Django REST Framework
In my DRF project, I'm trying to implement filtering for [multi-valued relationships](https://docs.djangoproject.com/en/2.2/topics/db/queries/#spanning-multi-valued-relationships) that combines filters with logical `AND`s, like in: a) `Blog.objects.filter(entry__headline__contains='Lennon', entry__pub_date__year=2008)` instead of `OR` like in: b) `Blog.objects.filter(entry__headline__contains='Lennon').filter(entry__pub_date__year=2008)`...
**Version:** 1.0.0.dev2 **Python version:** 3.6.11 **Other dependencies:** Django==3.0 django-cors-headers==3.5.0 django-filter==2.4.0 django-hashid-field==3.1.3 djangorestframework==3.11.1 djangorestframework-filters==1.0.0.dev2 djangorestframework-jsonapi==3.2.0 djangorestframework-simplejwt==4.4.0 dry-rest-permissions==0.1.10 I know I'm using a dev version but i'm putting the issue here for...
Hi, I had added ppc64le(Linux on Power) architecture support on travis-ci in the branch and looks like its been successfully added. I believe it is ready for the final review...
Allow AutoFilter to accept a `method` param and pass it to the generated filters. The same behaviour for the following ``` class MyFilter(FilterSet): title__contains = CharFilter(method='custom_pk_filter') title__endswith = CharFilter(method='custom_pk_filter') def...
Hello, I get the following error : ``` [...] class CompanyFilter(filters.FilterSet): File "/Users/remi/Programmation/IgnitionProgram/igniback/venv3/lib/python3.8/site-packages/rest_framework_filters/filterset.py", line 38, in __new__ cls.expand_auto_filters(new_class) File "/Users/remi/Programmation/IgnitionProgram/igniback/venv3/lib/python3.8/site-packages/rest_framework_filters/filterset.py", line 66, in expand_auto_filters for gen_name, gen_f in new_class.get_filters().items(): File...
Just to rehash, the goal of this issue is to investigate the differences between the following two queries: ```python Blog.objects.filter(entry__in=Entry.objects.filter(headline__contains="Lennon")) Blog.objects.filter( pk__in=Entry.objects \ .filter(headline__contains="Lennon") \ .values('blog') ) ``` In the...
Hi! We're wanting to soon update to Django 2.1, however doing so requires that we update from django-filters 1.x to 2.x, which in turn throws up this pip warning: ```...
Hey everybody. I’m using Django-rest-framework-filters for a project and it is great. Reason for message, is I’m running into issue with complex operations. Specifically I’m having trouble with grouping logic....
Filtering across relationships currently uses the default queryset. For example: ``` py class ArticleFilter(FilterSet): is_published = filers.BooleanFilter() body = filter.CharFilter() class AuthorFilter(FilterSet): article = filters.RelatedFilter(ArticleFilter) class AuthorViewSet(viewsets.ModelViewSet): queryset = models.Author.objects.all()...
The complex ops backend expects inner query strings to be URL encoded so that they may contain "unsafe" characters. If an inner query string contains any of the characters used...