python - How to get the id (not pk) from mongoengine models? -


my models

class result(document) :     id = intfield()     turn = intfield()     url = stringfield() 

the id not primary key.

as know, mongodb generate key named '_id'. use 'id' means. in django, id or pk means primary key.

so, how can field want mongodb through django?

thx~

currently id reserved primary key - can't reused non primary key.


Comments

Popular posts from this blog

php - Dynamic url re-writing using htaccess -

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -