summaryrefslogtreecommitdiff
path: root/tests/regressiontests/forms/models.py
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2007-11-18 20:25:23 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2007-11-18 20:25:23 +0000
commitb2b6fc8e3c78671c8b6af2709358c3213c84d119 (patch)
tree1867d8905a57a9a48402771b77336a0abaa77179 /tests/regressiontests/forms/models.py
parent86ca11dd6d94cc624d3e20f887a8de39350b3665 (diff)
Fixed #5975 -- Gave `ModelChoiceField` and `ModelMultipleChoiceField` ability to specify custom error messages.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6694 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms/models.py')
-rw-r--r--tests/regressiontests/forms/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/models.py b/tests/regressiontests/forms/models.py
index 1a6f566b6b..c7ce128560 100644
--- a/tests/regressiontests/forms/models.py
+++ b/tests/regressiontests/forms/models.py
@@ -10,6 +10,10 @@ class Defaults(models.Model):
def_date = models.DateField(default = datetime.date(1980, 1, 1))
value = models.IntegerField(default=42)
+class ChoiceModel(models.Model):
+ """For ModelChoiceField and ModelMultipleChoiceField tests."""
+ name = models.CharField(max_length=10)
+
__test__ = {'API_TESTS': """
>>> from django.newforms import form_for_model, form_for_instance