Changes between Version 21 and Version 22 of ModelInheritance
- Timestamp:
- Feb 27, 2006, 5:59:49 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ModelInheritance
v21 v22 177 177 178 178 {{{ 179 new_class._meta.parents = bases179 # Build complete list of parents 180 180 for base in bases: 181 181 if '_meta' in dir(base): 182 new_class._meta.parents.append(base) 182 183 new_class._meta.parents.extend(base._meta.parents) 183 184 184 }}} 185 185 … … 187 187 188 188 {{{ 189 # Add Fields inherited from parents 189 190 for parent in new_class._meta.parents: 190 191 for field in parent._meta.fields: