1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

gis: Merged 6672-6783 vis svnmerge from trunk

git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6815 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jeremy Dunck
2007-12-01 22:12:44 +00:00
parent 85ce45bc44
commit 23384af79b
96 changed files with 7511 additions and 4596 deletions

View File

@@ -323,6 +323,10 @@ Decimal("3.14")
Traceback (most recent call last):
...
ValidationError: [u'Enter a number.']
>>> f.clean(u'łąść')
Traceback (most recent call last):
...
ValidationError: [u'Enter a number.']
>>> f.clean('1.0 ')
Decimal("1.0")
>>> f.clean(' 1.0')
@@ -914,6 +918,11 @@ False
>>> f.clean('Django rocks')
True
>>> f.clean('True')
True
>>> f.clean('False')
False
>>> f = BooleanField(required=False)
>>> f.clean('')
False
@@ -930,6 +939,11 @@ False
>>> f.clean('Django rocks')
True
A form's BooleanField with a hidden widget will output the string 'False', so
that should clean to the boolean value False:
>>> f.clean('False')
False
# ChoiceField #################################################################
>>> f = ChoiceField(choices=[('1', '1'), ('2', '2')])