I would like to retrieve a bunch of rows from my database using a set of filters.
I was wondering if conditional filter is applicable in django. That is, \"filter if
from django.db.models import Q qs = Users.objects.filter( p_id=parent_id, status=True ).all() if user_id>0: qs = qs.filter( ~Q(id=user_id) )
in qs we will get the filtered results
qs