I create a "Post" entity via the following line:
post = Post(date=datetime.now(),title=postInfo['title'],body=postInfo['body'],postid=postIdForTitle(postInfo['title']),parent=author)
where author
is a datastore entity.
How do I access a "post"'s parent? I tried doing post.parent
but apparently "parent" is a function. I was unable to find this in the docs.
You can get a key of a parent entity from the key of your child entity. Look at the key Class:
https://developers.google.com/appengine/docs/python/datastore/keyclass#Key_parent