def __getstate__(self):
        """
        Allows the QuerySet to be pickled.
        """
        # Force the cache to be fully populated.
        len(self)

        obj_dict = self.__dict__.copy()
        obj_dict["_iter"] = None

        return obj_dict
def __getstate__ ( self ) : len ( self ) obj_dict = self . __dict__ . copy ( ) obj_dict [ "_iter" ] = None return obj_dict
Allows the QuerySet to be pickled.