In my case I need design my model in array of fields expected.
{field 1: string, field 2: [""], field 3: [""] }
So far I designed my model like following:
class Collaborator(models.Model):
name = models.CharField(max_length=50, blank=True, null = True, )
class Responsibility(models.Model):
name = models.CharField(max_length=50, blank=True, null = True, )
class Class1(models.Model):
field 1 = models.CharField(max_length=50, blank=True, null = True, )
field 2 = models.ManyToManyField(Responsibility, related_name='res_cards', blank=True,null=True )
field 3 = models.ManyToManyField(Collaborator, related_name='col_cards', blank=True, null=True )
So I am expecting for to get all fields in an array rather than define new model