开发者

Why does this instruction not work?

Hi I'm trying to count using keys only and get an error message when using this line self.response.out.write(A.all(keys_only=True).count(100000000))

The error message I get is TypeError: all() got an unexpected keyword argument 'keys_only'

Isn't it supposed to work this way? What am I doing wrong? Thanks `

UPDATE: I 开发者_开发百科found this way worked:

    query = A.all()
    query._keys_only = True        
    self.response.out.write(query.count(100000000))


There is problem with SearchableModel and keys_only. you can do some think like this.

query = A.all()
query._keys_only = True 
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜