如何从expando模型中获取所有属性? (不只是Model.properties())
我想做这样的事情:
...
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
但是Model.iteritem()不存在
这似乎很容易过来,但我有点难过 谢谢!
答案 0 :(得分:2)
rec.dynamic_properties()将为您提供Expando属性列表
http://code.google.com/appengine/docs/python/datastore/modelclass.html#Model_dynamic_properties