Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count = modelname.all(keys_only=True).count()
- count = modelname.all(keys_only=True).count(some_upper_bound_suitable_for_you)
- count = modelname.all(keys_only=True).count(some_upper_limit)
- class GetCount(webapp.RequestHandler):
- def get(self):
- query = modelname.all(keys_only=True)
- i = 0
- while True:
- result = query.fetch(1000)
- i = i + len(result)
- if len(result) < 1000:
- break
- cursor = query.cursor()
- query.with_cursor(cursor)
- self.response.out.write('<p>Count: '+str(i)+'</p>')
Add Comment
Please, Sign In to add comment