Ticket #6184: 6184.diff
File 6184.diff, 515 bytes (added by , 17 years ago) |
---|
-
django/utils/encoding.py
66 66 67 67 If strings_only is True, don't convert (some) non-string-like objects. 68 68 """ 69 if strings_only and isinstance(s, (types.NoneType, int)):69 if strings_only and not isinstance(s, basestring): 70 70 return s 71 71 if isinstance(s, Promise): 72 72 return unicode(s).encode(encoding, errors)