I am trying to get the parent key of a specific object. I have 2 classes, an album and a photo. The album is the parent of the photo, so when I upload a photo, I assign the key to this or that album that it belongs to the parent photo.
album = db.get(self.album_key) photo = Photo(parent=album)
The problem occurs when I try to request the parent id from the photo. The code below simply displays the output "parent key: <"
photo = db.get(photo_key) photoparent = photo.parent self.response.out.write("parent key: %s" %photoparent)
How to correctly remove the parent key from an instance of Photo?
Thanks!
source share