Ticket #15129: formats.patch

File formats.patch, 554 bytes (added by Artem Skoretskiy, 14 years ago)

Patch that does the fix

  • django/utils/formats.py

    a b  
    3434
    3535def get_format_modules(reverse=False):
    3636    """
    37     Returns an iterator over the format modules found
     37    Returns a list of the format modules found
    3838    """
    3939    lang = get_language()
    4040    modules = _format_modules_cache.setdefault(lang, list(iter_format_modules(lang)))
    4141    if reverse:
    42         modules.reverse()
     42        return list(reversed(modules)) # Don't reverse in place - that would break consequent calls
    4343    return modules
    4444
    4545def get_format(format_type):
Back to Top