I have a Books table where I want to retrieve all records based on different column values
e.g
Select * from Books where bookid = 2 || bookid = 3 || bookid = 4;
The book ids I get is from a Rent table:
rents =Rents.objects.filter(user=request.user)
So I have a queryset of rents object that contains a property bookid.
How do I get Books based on all the values of the rents?