1
0
mirror of https://github.com/django/django.git synced 2025-10-25 22:56:12 +00:00

boulder-oracle-sprint: Merged to [5383]

git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@5384 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Boulder Sprinters
2007-05-30 16:57:27 +00:00
parent e9dcb067c1
commit a82d071b48
31 changed files with 3053 additions and 2765 deletions

View File

@@ -3655,6 +3655,25 @@ u' id="header"'
u' class="news" title="Read this"'
>>> flatatt({})
u''
####################################
# Test accessing errors in clean() #
####################################
>>> class UserForm(Form):
... username = CharField(max_length=10)
... password = CharField(widget=PasswordInput)
... def clean(self):
... data = self.cleaned_data
... if not self.errors:
... data['username'] = data['username'].lower()
... return data
>>> f = UserForm({'username': 'SirRobin', 'password': 'blue'})
>>> f.is_valid()
True
>>> f.cleaned_data['username']
u'sirrobin'
"""
__test__ = {