Reputation: 1038
Looked through the documentation and can't work this out.
Is it possible to access the attribute of an entity retrieved from the datastore with a string in Python on GAE?
Something like employee.name but employee.<>
Upvotes: 1
Views: 43
Reputation: 9116
You can do something like this, if I understand you correctly:
getattr(MyModel, attrib_name)
which will retrieve the attribute attrib_name
Upvotes: 4