diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2009-03-31 20:30:05 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2009-03-31 20:30:05 +0000 |
| commit | 1e0acd537b087978162750ad908e564cecf3301c (patch) | |
| tree | bc94e9f2ac78fbaf9a510c784fbbac83e688b53f /tests/regressiontests/inline_formsets | |
| parent | 7f90c2cc569a7959a6b03bd4a271c70fc0b2d1e3 (diff) | |
[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
Diffstat (limited to 'tests/regressiontests/inline_formsets')
| -rw-r--r-- | tests/regressiontests/inline_formsets/models.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/regressiontests/inline_formsets/models.py b/tests/regressiontests/inline_formsets/models.py index 8b6f5dd342..9b1f8b4932 100644 --- a/tests/regressiontests/inline_formsets/models.py +++ b/tests/regressiontests/inline_formsets/models.py @@ -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 |
