1 | initial version |
In Django, when a model inherits from another model, it creates a one-to-one relationship between the parent and child model. Therefore, the fields of the parent class are not included in the table of the child class since they are already present in the parent table. To access the fields of the parent class, you can use the dot notation to reference them from the child class.