This is what I need for my project, I've been figuring out decent ways to avoid duplication of model content to each and every content I make in my project. Thanks you!
@bugbytes39232 жыл бұрын
Nice one, thank you for the comment!
@stevepole19702 жыл бұрын
Beautifully explained. Well done.
@bugbytes39232 жыл бұрын
Thank you very much!
@alaminbijoy10272 жыл бұрын
thanks man. Learned something new.
@bugbytes39232 жыл бұрын
Nice one man, thanks for commenting!
@danielcallaghan68922 жыл бұрын
aweome, very clear!
@bugbytes39232 жыл бұрын
Thank you!
@DemelashShimekit6 ай бұрын
Thank you
@bugbytes39236 ай бұрын
Thanks for watching!
@chaseeby100 Жыл бұрын
Thank you!
@bugbytes3923 Жыл бұрын
Thanks a lot for watching!
@sarozpradhan64 Жыл бұрын
I used field created_at and updated_at in CommonField class and inherited but how do i make sure that the created_at and updated_at columns are at last of the table because when i inherited it, it comes at first of the table.
@fernandtape93632 жыл бұрын
Hi Bugbytes, thanks for this new video. Can this model inheritance be used in product variation of an eccommerce? If yes, how?
@bugbytes39232 жыл бұрын
Thanks for commenting. Yes, you may have multiple different types of products, each with their own fields. But there may be a common set of fields that you can define on a base class (this could be an abstract model, or you could go with the multi-table inheritance approach). For example, all products would have a "price", so it makes sense to use this on a base class. But certain products may have different, specific fields. A clothing product may have fields such as "size", whereas a food/drink product may have fields such as "calories". These would belong in the subclasses. I hope that makes sense!
@MagnusAnand2 жыл бұрын
It would be cool if you could make a video about using composition in Django 💪
@MagnusAnand Жыл бұрын
An issue with Multiple Inheritance is that you can have a performance hiy if your database is too large, because in has to make joins for every query.