Ticket #3022: resolve_variable-negatives.patch

File resolve_variable-negatives.patch, 518 bytes (added by Collin Grady <cgrady@…>, 18 years ago)
  • django/template/__init__.py

     
    624624
    625625    (The example assumes VARIABLE_ATTRIBUTE_SEPARATOR is '.')
    626626    """
    627     if path[0].isdigit():
     627    if path[0].isdigit() or (len(path) > 1 and path[0] == '-' and path[1].isdigit()):
    628628        number_type = '.' in path and float or int
    629629        try:
    630630            current = number_type(path)
Back to Top