python - Mongoengine query set to list conversion -


as in django sql backend can convert queryset flat list by

foovar.objects.all().values_list('id', flat=true) 

give list of ids

how list of ids in mongo backend ,orm being used mongoengine in values_list function has no flat parameter.

you right, there no flat parameter in values_list. mongoengine has values_list. stating:

foovar.objects.all().values_list('id') 

returns id's of foovar model.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -