mirror of
https://github.com/django/django.git
synced 2025-08-18 17:50:58 +00:00
Fixed #3457 -- Allow overridding of error messages for newforms Fields.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ee49e934d9
commit
26ea06b0ab
7 changed files with 533 additions and 54 deletions
|
@ -42,4 +42,11 @@ u''
|
|||
# Can take a mixture in a list.
|
||||
>>> print ValidationError(["First error.", u"Not \u03C0.", ugettext_lazy("Error.")]).messages
|
||||
<ul class="errorlist"><li>First error.</li><li>Not π.</li><li>Error.</li></ul>
|
||||
|
||||
>>> class VeryBadError:
|
||||
... def __unicode__(self): return u"A very bad error."
|
||||
|
||||
# Can take a non-string.
|
||||
>>> print ValidationError(VeryBadError()).messages
|
||||
<ul class="errorlist"><li>A very bad error.</li></ul>
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue