Jason Spitkoski
Jason Spitkoski

Reputation: 68

get expando model properties in python for google-app-engine

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

Answers (1)

Drew Sears
Drew Sears

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

Related Questions