开发者

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 i开发者_Go百科n 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!


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

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜