I've saw a few blog posts (like the one from yergler) about this but haven't been able to find a good elegant solution.

I have 3 Models:

class Workflow(models.Model): name = models.CharField(max_length=255) company = models.ForeignKey(Company) class Meta: unique_together = ('name', 'company') class Milestone(models.Model): workflow = models.ForeignKey(Workflow) tasks = models.ManyToManyField(Task) class Task(models.Model): task = models.CharField(max_length=255)

How could I create a form that allows me to add many milestones to a workflow and many tasks to a milestone?

Basically, I want to give them a create form or an edit form and allow them to build a workflow with milestones and tasks but would like to allow them to add them dynamically with javascript.

The dynamic/javascript part is easy but I haven't been able to figure out how to nest a formset inside a formset. i.e the Tasks underneath the Milestone.