twoscoops / two-scoops-of-django-1.8

Tracking thoughts and feature requests for Two Scoops of Django 1.8 in the issue tracker. And the book's code examples are here.
400 stars 81 forks source link

7.4.1 invalid example code for iterator #91

Closed michaeljohnbarr closed 8 years ago

michaeljohnbarr commented 9 years ago
from models.customers import Customer

customers = []
for customer in Customer.objects.iterate():
    ...

Should be:

for customer in customer.objects.iterator():
    ...

The difference of iterate and iterator.

pydanny commented 8 years ago

🚢