Reputation: 349
q = Institution_Table.all().run(batch_size=2000).order('name')
gives me the following error:
AttributeError: '_QueryIterator' object has no attribute 'order'
Upvotes: 0
Views: 151
Reputation: 9116
The example given in the docs shows that .order('name')
is attached to a query.
In your example you are attaching it after the query has been run.
Try:
q = Institution_Table.all().order('name')
results = q.run()
Here: https://developers.google.com/appengine/docs/python/datastore/queries#Restrictions_on_Queries
Upvotes: 2