[Django]-How to aggregate group in mongoengine python

4👍

I have solved the problem, I was doing the aggregate wrong.

models.Test.objects.filter(agreement__in = agreements).aggregate(
  {"$group": { "_id": "$created" }}
)

Thanks anyway 🙂

Leave a comment