Skip to content

Instantly share code, notes, and snippets.

@hdknr
Created October 19, 2009 19:04
Show Gist options
  • Save hdknr/213635 to your computer and use it in GitHub Desktop.
Save hdknr/213635 to your computer and use it in GitHub Desktop.
class QuerySet(object):
"""
Represents a lazy database lookup for a set of objects.
"""
def __init__(self, model=None, query=None):
self.model = model
self.query = query or sql.Query(self.model, connection)
self._result_cache = None
self._iter = None
self._sticky_filter = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment