Changes between Initial Version and Version 1 of Ticket #22601, comment 2


Ignore:
Timestamp:
May 8, 2014, 10:32:11 AM (11 years ago)
Author:
Ilya Semenov

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22601, comment 2

    initial v1  
    1 There can only be a single abstract model base, while mixins provide more degree a freedom. For instance, one could have a model which is Orderable and Approveable, and another model which is Orderable and Rateable.
     1There can only be a single abstract base model, while mixins provide more degree of freedom. For instance, one could have a model which is Orderable and Approveable, and another model which is Orderable and Rateable.
    22
    3 Inheritance and mixins are different OO concepts. Model inheritance is for the cases when a base model defines the base behavior, and derived classes refine or specify it. Mixins inject certain behaviour which is essentially unrelated to the actual model.
     3Inheritance and mixins are different OOD concepts. Model inheritance is for the cases when a base model defines the base behavior, and derived classes refine or specify it. Mixins inject certain behaviour which is essentially unrelated to the actual model.
    44
    55Mixins are fully supported by django models except of the new migrations module. It should either be fixed, or clearly stated that such kind of inheritance is unsupported.
Back to Top