+class BookProxy(models.Model):
+ def __init__(self, book, key):
+ self.book = book
+ self.key = key
+
+ def __getattr__(self, item):
+ if item not in ('book', 'key'):
+ return self.book.__getattribute__(item)
+ else:
+ return self.__getattribute__(item)
+
+
+class QuerySetProxy(models.QuerySet):
+ def __init__(self, l):
+ self.list = l
+
+ def __iter__(self):
+ return iter(self.list)
+
+