摘要: class ModelIterable(BaseIterable): """Iterable that yields a model instance for each row.""" def __iter__(self): queryset = self.queryset db = queryse 阅读全文
posted @ 2018-11-18 17:27 十七楼的羊 阅读(253) 评论(0) 推荐(0) 编辑
摘要: class ModelBase(type): """Metaclass for all models.""" def __new__(cls, name, bases, attrs, **kwargs): super_new = super().__new__ # Also ensure initi 阅读全文
posted @ 2018-11-18 11:12 十七楼的羊 阅读(1325) 评论(0) 推荐(0) 编辑