counting issue i use mongodb why show always 0

38 views
Skip to first unread message

Armaan Alam

unread,
Feb 19, 2024, 4:30:14 AM2/19/24
to django...@googlegroups.com
queryset = Notification.objects.filter(is_seen__in=[False]).count()

Muhammad Juwaini Abdul Rahman

unread,
Feb 19, 2024, 4:34:06 AM2/19/24
to django...@googlegroups.com
How do you connect django to mongodb?

On Mon, 19 Feb 2024 at 17:29, Armaan Alam <armaan...@gmail.com> wrote:
queryset = Notification.objects.filter(is_seen__in=[False]).count()

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

ABDUL HAFEEZ

unread,
Feb 19, 2024, 4:45:09 AM2/19/24
to Django users
can you show model notification?

Shivam Kumar

unread,
Feb 19, 2024, 9:30:43 AM2/19/24
to django...@googlegroups.com
Use is_seen=False instead of is_seen__in=[False]

On Mon, Feb 19, 2024, 3:00 PM Armaan Alam <armaan...@gmail.com> wrote:
queryset = Notification.objects.filter(is_seen__in=[False]).count()

--
Reply all
Reply to author
Forward
0 new messages