Google App Engine retrieve user defined key name
Is there a way to retrieve the key name you set using:
Model(
key_name = ...
...
)
I tried using the key() method but开发者_开发问答 that returns the one Google makes.
It is key().name()
Docs on the Key class
I was searching for the solution in my case of NDB datastore. check NDB Key link.
With NDB model, you have to use model.key.string_id()
精彩评论