1👍
Assuming you have models that maps 1-1 with your SQL query:
status_zeros = Dispatch.objects.filter(status=0).values_list('pk', flat=True)
BookingTimeline.objects.filter(status="completed", pk__in=status_zeros)
0👍
And than should be
booking_timelines = BookingTimeline.objects.filter(status="completed",pk__in=status_zeros)
times_set = set( booking_timelines.values_list('time', flat=True) )
👤CoRy
- [Answer]-Confirmation on multiple buttons in django template
- [Answer]-How to get data of all rows from a dynamically generated table by jQuery
- [Answer]-Unable to check if queryset is a subset
Source:stackexchange.com