I used DjangoFilterBackend with all fields:
class EntitiesViewSet(viewsets.ModelViewSet):
queryset = Entity.objects.all()
serializer_class = EntitiesSerializer
pagination_class = StandardResultsSetPagination
filter_backends = (DjangoFilterBackend,)
filter_fields = '__all__'
It worked perfectly for querying through the url of one or more fields with fixed or boolean values.
like this:
http://localhost:8000/api/persons/?news_by_email=True
http://localhost:8000/api/persons/?issuer=SSP-SC
But I need to also filter for fields with null value and it is not working.
I tried:
/persons/?parent=null
/persons/?parent=Null
/persons/?parent=NULL
/persons/?parent=
/persons/?parent__isnull
Any suggestions in this same simplified process?
Any suggestions that require an extension or new viewset?
/persons/?parent=None
?