0

私はこれを得る:

AttributeError: 'list' object has no attribute 'cursor'

この行で:

company_cursor = companies.cursor()

次のコードを実行すると:

q = Company.all()
q.order("datetime")
companies = q.fetch(5)

company_cursor = memcache.get("company_cursor")

if company_cursor:
    companies.with_cursor(start_cursor = company_cursor)

for company in companies: 
    do_stuff(company)

company_cursor = companies.cursor() 
memcache.set("company_cursor",company_cursor, 11000)

私が見る限り、私のコードは次の例のようになります。

https://developers.google.com/appengine/docs/python/datastore/queries .

4

1 に答える 1