Reputation: 68
How do I get all the properties from an expando model? (not just Model.properties())
I want to do something like this:
...
recs = query.fetch( 100 )
for rec in recs:
for name, value in rec.iteritem():
# figure out what, if any, expando properties are in this record
but Model.iteritem() doesn't exist
This seems like it should be pretty easy to over come, but I'm a bit stumped.
Thanks!
Upvotes: 1
Views: 596
Reputation: 12838
rec.dynamic_properties() will give you a list of Expando properties
http://code.google.com/appengine/docs/python/datastore/modelclass.html#Model_dynamic_properties
Upvotes: 2