Question:

List out the inheritance styles in Django?

Answer:

In Django, there is three possible inheritance styles

  • Abstract base classes: This style is used when you only wants parent’s class to hold information that you don’t want to type out for each child model
  • Multi-table Inheritance: This style is used If you are sub-classing an existing model and need each model to have its own database table
  • Proxy models: You can use this model, If you only want to modify the Python level behavior of the model, without changing the model’s fields

Keywords:

© 2017 QuizBucket.org