let's say i have these classes :
models.py
class Parent(models.Model):
title = models.CharField(max_length=250)
class Child(models.Model):
parent = models.ForeignKey(Parent)
title = models.CharField(max_length=250)
class Family(models.Model):
title = models.CharField(max_length=250)
parent = models.ForeignKey(Parent)
child = models.ManyToManyField(Child)
the problem with this code the family form shows all the "Child" objects.
I need to show "Child" objects only if the Child is related to "Parent" objects in the family form.
if there's a way not to use manytomanyfield i am open to that too..
any idea?