1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[1.0.X] Forms in model formsets and inline formsets can now be deleted even if they don't validate. Related to #9587. Backport of r10283 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Joseph Kocherhans
2009-03-31 20:30:05 +00:00
parent 7f90c2cc56
commit 1e0acd537b
5 changed files with 58 additions and 15 deletions

View File

@@ -13,6 +13,19 @@ class Child(models.Model):
school = models.ForeignKey(School)
name = models.CharField(max_length=100)
class Poet(models.Model):
name = models.CharField(max_length=100)
def __unicode__(self):
return self.name
class Poem(models.Model):
poet = models.ForeignKey(Poet)
name = models.CharField(max_length=100)
def __unicode__(self):
return self.name
__test__ = {'API_TESTS': """
>>> from django.forms.models import inlineformset_factory