I am trying to access/query an existing collection in mongo via the following code but i get 0 count even though there are 33 documents in the collection!
from mongoengine import *
class TASK(DynamicDocument):
pass
connect("try", host="mongodb://x.x.x.x:27017/")
print(task.objects().count())
o/p is 0
TASK is a collection in try DB. Has 33 documents can be seen in mongo compass!
Any advice on what i am doing wrong?
TIA!