I have a queryset :-
queryset = my_object.someobject_set.all()
From there onwards, I want to filter from the queryset. i.e:
print queryset.filter(name='some1').exists()
print queryset.filter(name='some2').exists()
print queryset.filter(name='some3').exists()
But for each of the filter queries, there is a database hit again. How can I cache the queryset and then filter from it?
I even tried to evaluate the queryset before filtering by doing this:-
print len(queryset)
But this doesn't work. Any help??