In my viewSet I am doing a query,
queryset= Books.objects.all();
Now from an ajax call I get my filter values from UI i.e. age,gender, etc. of auther.There will be a total of 5 filters.
Now the problem which I ran into is how am I going to add filters to my query(only those filters which have any value).
What I tried is I checked for individual filter value and did query, but that way it fails as if the user remove the filter value or add multiple filters. Any better suggestion how to accomplish this?