Changeset 6746
- Timestamp:
- 11/29/07 13:30:38 (9 months ago)
- Files:
-
- django/trunk/django/newforms/fields.py (modified) (2 diffs)
- django/trunk/tests/regressiontests/forms/fields.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/newforms/fields.py
r6745 r6746 18 18 19 19 from django.utils.translation import ugettext_lazy as _ 20 from django.utils.encoding import StrAndUnicode, smart_unicode 20 from django.utils.encoding import StrAndUnicode, smart_unicode, smart_str 21 21 22 22 from util import ErrorList, ValidationError … … 236 236 if not self.required and value in EMPTY_VALUES: 237 237 return None 238 value = s tr(value).strip()238 value = smart_str(value).strip() 239 239 try: 240 240 value = Decimal(value) django/trunk/tests/regressiontests/forms/fields.py
r6745 r6746 321 321 Decimal("3.14") 322 322 >>> f.clean('a') 323 Traceback (most recent call last): 324 ... 325 ValidationError: [u'Enter a number.'] 326 >>> f.clean(u'ÅÄ 327 ÅÄ') 323 328 Traceback (most recent call last): 324 329 ...
