I have a Model()
called Member
and I'm inserting new entries using Member.get_or_insert(key_name='lipis')
for example.
My question is how can I get a key_name
that I used to insert a new entry for a specific member
?
Do you mean how do you then find that record using the key name, or how do you take an entity and find its key name?
To get that record back out of the datastore, do:
myMember = Member.get_by_key_name('lipis')
...if you have the member record and want to get its key name, you can then do:
keyName = myMember.key().name()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With