Almost certainly start_date and end_date are not what you expect. Do the types match? In any case print them out and see what you are actually getting.
hth - Tom > On Mar 19, 2021, at 6:00 AM, Manuel Buri <[email protected]> wrote: > > Hi, > > I am having this query set in my view: > context['bookings']=Booking.objects.filter( > Q(organization_id=request.user.organization_id), Q(booking_time__range= > (start_date, end_date))) > > It produces a non-empty query set! > However, I am NOT able to display it in my template. > > If I get rid of Q(booking_time__range= (start_date, end_date) and only do: > context['bookings']=Booking.objects.filter( > Q(organization_id=request.user.organization_id)) > then it is also non-empty AND it is displaying it in my template. > > What am I missing here? > > Thank you for your help. > > Manuel > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/76f85c72-19f9-4ad3-a39b-01dc60aa6da5n%40googlegroups.com > > <https://groups.google.com/d/msgid/django-users/76f85c72-19f9-4ad3-a39b-01dc60aa6da5n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/83B24C06-8DA4-4F38-9384-FF4C19DBE262%40gmail.com.

