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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -