Ticket #14807: patch

File patch, 679 bytes (added by Klaas van Schelven, 13 years ago)
  • django/utils/formats.py

    diff -r 35aeedea954d django/utils/formats.py
    a b  
    114114    If use_l10n is provided and is not None, that will force the value to
    115115    be localized (or not), overriding the value of settings.USE_L10N.
    116116    """
    117     if isinstance(value, (decimal.Decimal, float, int, long)):
     117    if isinstance(value, (decimal.Decimal, float, int, long)) and not isinstance(value, bool):
    118118        return number_format(value, use_l10n=use_l10n)
    119119    elif isinstance(value, datetime.datetime):
    120120        return date_format(value, 'DATETIME_FORMAT', use_l10n=use_l10n)
Back to Top