'How to add Product details logic like amazon in an ecommerce website using Django

I am trying to build an e-commerce website using Django but I am not able to figure out how companies like Amazon and Flipkart store product details like this. I can hardcore this thing by making each attribute in the database but I think it is not the most efficient way to do this. There gonna some other way to do the same thing so please give me some valuable suggestions

enter image description here

Please let me know if you need any other kind of information



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source