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
Post a Comment