Saturday, May 28, 2011

Embedded Inline Formsets

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 multiple milestones with multiple tasks?


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment