I have the following two models:
class Step(models.Model):
start_time = models.TimeField()
time = models.IntegerField()
schedule = models.ForeignKey(Schedule, on_delete=models.CASCADE)
class Schedule(models.Model):
identifier = models.CharField(max_length=10)
name = models.CharField(max_length=100)
steps = models.ManyToManyField('manager.Step', related_name='steps')
However when editing the Schedule
and adding steps
via admin the Step
does not update its schedule
?
How do you handle two way binding like this in Django?