Niklas Rosencrantz
Niklas Rosencrantz

Reputation: 26652

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))

Upvotes: 1

Views: 146

Answers (1)

Abdul Kader
Abdul Kader

Reputation: 5842

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

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

Upvotes: 1

Related Questions