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

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
This commit is contained in:
Gary Wilson Jr
2007-11-18 20:25:23 +00:00
parent 86ca11dd6d
commit b2b6fc8e3c
3 changed files with 69 additions and 13 deletions

View File

@@ -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