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:
https://www.youtube.com/playlist?list=PL-2EBeDYMIbQIu4aMZYqM6_w1ihIKWIql
๐ ๐๐ต๐ฎ๐ฝ๐๐ฒ๐ฟ๐:
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: https://twitter.com/bugbytesio
๐ถ TikTok: https://www.tiktok.com/@bugbytes.io
๐ ๐๐๐ฟ๐๐ต๐ฒ๐ฟ ๐ฟ๐ฒ๐ฎ๐ฑ๐ถ๐ป๐ด ๐ฎ๐ป๐ฑ ๐ถ๐ป๐ณ๐ผ๐ฟ๐บ๐ฎ๐๐ถ๐ผ๐ป:
Model Inheritance: https://docs.djangoproject.com/en/4.0/topics/db/models/#model-inheritance
related_name issue: https://docs.djangoproject.com/en/4.0/topics/db/models/#be-careful-with-related-name-and-related-query-name
#django #python