So I have queryset1 that filters ModelA by 2 parameters:
queryset1 = ModelA.objects.all().filter(par1="X",par2="Y")
Then I have another queryset2 that I would like to filter ModelB by grabbing the elements that have already been filtered by queryset1, and also that follow another parameter:
queryset2 = ModelB.objects.all().filter(par3="X" for i in queryset,par4="Z")
My question is: Is there a way to perform a queryset on a queryset that you have already made? In the end I would like to pull the objects from ModelA and ModelB that follow par1 par2 par3. How would I do this?
ModelAandModelB? What are you trying to do withfor i in queryset?