Creature Feature
mostly code problems + solutions, a few deep thoughts
Wednesday, February 22, 2012
app engine and datastore keys
say you know the key name's string of a Model instance and you want to fetch it from the datastore. It goes like this:
Model.get(db.Key.from_path("Model",key_name))
why so complicated? why can't you just Model.get(key_name)? Couldn't tell you, but was getting inexplicable errors that way.
facepalms: 4
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment