HI i am trying to use OR operator in django query. my code looks like:
hotels = models.Hotel.objects.filter(
wed=True,
county=hotel_main.county.id,
(x=True)|(y=True)|(z=True),
subscriptions__end_date__gte=datetime.date.today(),
subscriptions__enquiry_count__lte=F('subscriptions__tier__enquiry_limit'),
).distinct()
I am trying to fetch a record having atleast one of the above x, y, z as true. Any help ...thank you