I do not really understand what does the key.from_path() do.
If you could explained it a little better and more concise then here.
Also, the parent parameter intrigues me .
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.
Every item in the datastore has a key.
You can either create that key and then use it to retrieve the object in the datastore that has that key or you can save an object to the datastore with that key for later retrieval.
address_k is a key after this operation.
Then the second line gets the datastore object that has that key.
Parent simply says that this object is a child of another object. So when you set the parent it becomes part of the key also.
You could have multiple address objects, all with the same parent, employee. Your employee might have many homes! Read this: https://developers.google.com/appengine/docs/python/datastore/entities#Ancestor_Paths