I have models - Commodity, Clother and child models, as Acessories, Outwear, etc.:
class Commodity(models.Model):
atribute = models.CharField()
class Clother(models.Model):
commodity = models.ForeignKey(Commodity)
clother_atribute = models.CharField()
class Acessories(models.Model):
clother = models.ForeignKey(Clother)
acessories_atribute = models.CharField()
class Outwear(models.Model):
clother = models.ForeignKey(Clother)
outwear_atribute = models.CharField()
How can I serialize the parent model Commodity to call all vertical dependencies? I suppose to query Commodity id and get all Clother attributes and Acessories or Outwear attributes.