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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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:
…if you have the member record and want to get its key name, you can then do: