[Answer]-How to fetch specific collection from mongodb in django

1👍

find({}) returns cursor. You need to get the items. Either cast to list or iterate over the result.

Something like:

mdb = conn.events.polls_post.find({})
mdb_list = list(mdb)
json.dumps(mdb_list)

Look here

👤eran

Leave a comment