This is where he will sent me the id (eg:5) and i will save that 5 into relationship field and display Son
My way of thinking is creating a new table call relationship and hardcode each relationship 1 by 1 (all 11 of it)
Then change the relationship field in Family into this : relationship = models.ForeignKey(Relationship)
But i have a feeling this is a very troublesome way to do it.
Can anyone help me on what way it will be easier ?
This is the model:
class Family(models.Model):
userId = models.ForeignKey(MyUser, related_name='user_family')
relationship = models.CharField(max_length=100)
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
gender = models.CharField(max_length=6, blank=True, null=True)