0 votes
in Data Handling by
What are the different inheritance styles in Django?

1 Answer

0 votes
by

Django has three possible inheritance styles:

Inheritance style Description

Abstract base classes

Used when you want to use the parent class to hold information that you don’t want to type for each child model. Here, the parent class is never used in solitude

Multi-table inheritance

Used when you have to subclass an existing model and want each

model to have its own database table

Proxy models

Used if you only want to modify the Python-level behavior of a model, without changing the ‘models’ fields in any way

Related questions

0 votes
asked Apr 3, 2020 in Data Handling by amita rallin
0 votes
asked Apr 3, 2020 in Data Handling by amita rallin
...