Changes between Initial Version and Version 1 of Ticket #22601, comment 2
- Timestamp:
- May 8, 2014, 10:32:11 AM (11 years ago)
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 afreedom. For instance, one could have a model which is Orderable and Approveable, and another model which is Orderable and Rateable.1 There 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. 2 2 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.3 Inheritance 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. 4 4 5 5 Mixins 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.