[1.7.x] Fixed #22601 -- Added a note about model inheritance.
Thanks semenov for the report.
Backport of 2ea1e70b85
from master
This commit is contained in:
parent
0204893a18
commit
5d7ad16a1b
|
@ -838,11 +838,14 @@ Model inheritance
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Model inheritance in Django works almost identically to the way normal
|
Model inheritance in Django works almost identically to the way normal
|
||||||
class inheritance works in Python. The only decision you have to make
|
class inheritance works in Python, but the basics at the beginning of the page
|
||||||
is whether you want the parent models to be models in their own right
|
should still be followed. That means the base class should subclass
|
||||||
(with their own database tables), or if the parents are just holders
|
:class:`django.db.models.Model`.
|
||||||
of common information that will only be visible through the child
|
|
||||||
models.
|
The only decision you have to make is whether you want the parent models to be
|
||||||
|
models in their own right (with their own database tables), or if the parents
|
||||||
|
are just holders of common information that will only be visible through the
|
||||||
|
child models.
|
||||||
|
|
||||||
There are three styles of inheritance that are possible in Django.
|
There are three styles of inheritance that are possible in Django.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue