Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed a small bug in strings_only handling for force_unicode().

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent c599031 commit 671a8359e8a2c869264e913ace1a0e03be193d13 @malcolmt malcolmt committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/utils/
2  django/utils/
@@ -30,7 +30,7 @@ def force_unicode(s, encoding='utf-8', strings_only=False, errors='strict'):
If strings_only is True, don't convert (some) non-string-like objects.
- if strings_only and isinstance(s, (types.NoneType, int)):
+ if strings_only and isinstance(s, (types.NoneType, int, long)):
return s
if not isinstance(s, basestring,):
if hasattr(s, '__unicode__'):

0 comments on commit 671a835

Please sign in to comment.
Something went wrong with that request. Please try again.