djdb/models.py
def fetch_all(cls):
        """Yields all artists, in a random order."""
        q = cls.all().order("__key__")
        while True:
            batch = list(q.fetch(500))
            if not batch:
                break
            for art in batch:
                yield art
            q = cls.all().order("__key__").filter("__key__ >", batch[-1].key())
Yields all artists, in a random order.
Yields all artists, in a random order.
Yields all artists in a random order .
def fetch_all(cls):
        q = cls.all().order("__key__")
        while True:
            batch = list(q.fetch(500))
            if not batch:
                break
            for art in batch:
                yield art
            q = cls.all().order("__key__").filter("__key__ >", batch[-1].key())
def fetch_all ( cls ) : q = cls . all ( ) . order ( "__key__" ) while True : batch = list ( q . fetch ( 500 ) ) if not batch : break for art in batch : yield art q = cls . all ( ) . order ( "__key__" ) . filter ( "__key__ >" , batch [ - 1 ] . key ( ) )
Yields all artists, in a random order.
Yields all artists in a random order .
"""Yields all artists, in a random order."""
cls