summaryrefslogtreecommitdiff
path: root/tests/regressiontests/inline_formsets/models.py
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2009-03-31 19:55:20 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2009-03-31 19:55:20 +0000
commit15becf23a9e4c9b230745738d2d42f6ab8f0f031 (patch)
treeafccfb3d96e5c586e8630faabf92f4973f96ba05 /tests/regressiontests/inline_formsets/models.py
parent98f5f68463adae5be03f77b594626385221e3ed9 (diff)
Forms in model formsets and inline formsets can now be deleted even if they don't validate. Related to #9587.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/inline_formsets/models.py')
-rw-r--r--tests/regressiontests/inline_formsets/models.py13
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