I just started working with general concepts based on a class and love it. I have one struggle that I still can’t solve.
I have one abstract class called a group, and two subsidiaries and a Bond. (I simplified my example). These are my models.py:
models.py
class Group(BaseModel):
name = models.CharField(max_length=30, unique=True)
class Meta:
abstract = True
class Company(Group):
def __str__(self):
return "Company " + self.name
class Bond(Group):
def __str__(self):
return "Bond " + self.name
group_detail.html group.name. , company.name bond.name, . , , . , , ?