views:

73

answers:

1

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!

+2  A: 

rec.dynamic_properties() will give you a list of Expando properties

http://code.google.com/appengine/docs/python/datastore/modelclass.html#Model_dynamic_properties

Drew Sears
beauty. I checked that page out, but dynamic_properties() wasn't in the api list at the top of the page. Thanks!
Jason Spitkoski