How to list kinds in datastore?

前端 未结 3 605
我寻月下人不归
我寻月下人不归 2021-01-18 20:44

I just had to figure this out for my own application, so reposting the answer here.

3条回答
  •  暖寄归人
    2021-01-18 21:39

    Time has passed since this was asked and answered. Now there's a simpler way.

    See http://code.google.com/appengine/docs/python/datastore/metadataqueries.html

    q = Kind.all()
    for kind in q.fetch(100):
      print kind.kind_name
    

提交回复
热议问题