Приветствую!
При попытке вызвать Apparel.objects.all() или Apparel.objects.get(pk=1) получаю ошибку
AttributeError: 'Apparel' object has no attribute 'name'
class Apparel(models.Model):
price = models.IntegerField()
color = models.CharField()
...
class ApparelSize(models.Model):
size = models.CharField()
apparel = models.ForeignKey(Apparel, on_delete=models.PROTECT)
class Material(models.Model):
material = models.CharField()
apparel = models.ForeignKey(Apparel, on_delete=models.PROTECT)
class ApparelDetail(Apparel):
name = models.CharField()
description = models.TextField()
...
Все классы имеют данные в mysql.