Friday, March 19, 2021

Re: View / Query Set not showing with filter

Hi Nagaraju

May I ask if your question is related to my post?

Thanks a lot,
Manuel

sent from my phone.
sorry for typos.

On Fri, 19 Mar 2021, 19:10 Nagaraju Singothu, <nagarajusingothu94@gmail.com> wrote:
Dear connectors,

    Please let me know, what is double tap in python?. Any tutorials available in YouTube. 

On Fri 19 Mar, 2021, 6:31 PM Manuel Buri, <manuel.buri@gmail.com> 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 django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/76f85c72-19f9-4ad3-a39b-01dc60aa6da5n%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/2DC9EY75yuM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMyGuAYeFYOEnpk-MkHE51enE%2BEgGwtBrOtnTTtbAHCwC9wL0w%40mail.gmail.com.

--
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 django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACx7KOTHWihQVhTzeqOe109wJiVOfXxSt0iQvywFFpKb723%2BUg%40mail.gmail.com.

No comments:

Post a Comment