Question

I have a queryset like this in python.

notes = Note.objects[:10]

if i do len(notes) it gives me 10 which is correct. But when i pass "notes" object to template and try

{{notes|length}} 

then i get 16 (which is total count of note data). Even if i do Note.objects.limit(5) it's the same. Is this a bug in MongoEngine? or am i doing something wrong?

Was it helpful?

Solution

This was a bug in MongoEngine. Issue about this can be found on; https://github.com/hmarr/mongoengine/issues/166

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top