Example #1
0
 def _fill_fields_cache(self):
     cache = []
     for parent in self.parents:
         for field, model in parent._meta.get_fields_with_model():
             if model:
                 cache.append((field, model))
             else:
                 cache.append((field, parent))
     cache.extend((f, None) for f in self.local_fields)
     self._field_cache = tuple(cache)
     self._field_name_cache = [x for x, _ in cache]
Example #2
0
 def _fill_fields_cache(self):
     cache = []
     for parent in self.parents:
         for field, model in parent._meta.get_fields_with_model():
             if model:
                 cache.append((field, model))
             else:
                 cache.append((field, parent))
     cache.extend((f, None) for f in self.local_fields)
     self._field_cache = tuple(cache)
     self._field_name_cache = [x for x, _ in cache]