Problem extracting month Djongo / MongoDB

34 views
Skip to first unread message

Eswar Subramanyam

unread,
Mar 23, 2020, 11:14:37 AM3/23/20
to Django users
I am using MongoDB as underlying DB with Django.

pipeline =  {
'price' : Sum('price'),
'month' : ExtractMonth('dateValue'),
}

queryset = ListingBooks.objects.values('dateValue','typeBook').annotate(**pipeline)

Unfortuantely i get a NotImplementError, as if Djongo ORM i use doesnt implement this function.

Can anyone hint me on how to keep the grouping by month at this query level without having to do it manually at the serverside or client side ?

Thank you
Es. 

Eswar Subramanyam

unread,
Mar 24, 2020, 5:45:37 PM3/24/20
to Django users
Does someone have any idea of any other groups on which i can get help on my question ? Thanks. BR Es.
Reply all
Reply to author
Forward
0 new messages