Changes between Version 16 and Version 17 of ModelInheritance


Ignore:
Timestamp:
Feb 27, 2006, 4:48:21 PM (18 years ago)
Author:
cell@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModelInheritance

    v16 v17  
    169169}}}
    170170
    171 Thus, there is simply no 'name' field for it to inherit.  So, we need to have ModelBase to walk through the parent classes and call contribute_to_class on each of the fields found in _meta.fields.  As we walk the inheritance tree, we look for a '_meta' attribute to determine if our current node is a Model.  Otherwise, it is either a mixin class or the Model class iteself.
     171Thus, there is simply no 'name' field for it to inherit.  So, we need to have ModelBase walk through the parent classes and call contribute_to_class on each of the fields found in _meta.fields.  As we walk the inheritance tree, we look for a '_meta' attribute to determine if our current node is a Model.  Otherwise, it is either a mixin class or the Model class iteself.
Back to Top