Django Model Inheritance - Abstract Models and Multi-Table Inheritance

Published: 07 March 2022
on channel: BugBytes
4,205
165

This video will dive into 2 methods of model inheritance in Django.

1. Abstract Classes
2. Multi-Table Inheritance

Both approaches will be considered, and the effects on the underlying database examined.

▶️ Full Playlist:
   • Django Primers  

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
01:16 Creating Quiz model
02:06 Creating Question abstract model
03:42 Creating subclasses for question types
06:16 Examining database structure
07:17 Querying models in shell
10:45 Multi-table inheritance
12:48 Querying in the shell

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
https://ko-fi.com/bugbytes

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://www.bugbytes.io/posts/
👾 Github: https://github.com/bugbytes-io/
🐦 Twitter:   / bugbytesio  
🎶 TikTok:   / bugbytes.io  

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Model Inheritance: https://docs.djangoproject.com/en/4.0...
related_name issue: https://docs.djangoproject.com/en/4.0...


#django #python