Ticket #1396: relatedobject.patch

File relatedobject.patch, 744 bytes (added by Max Battcher <me@…>, 18 years ago)

Patch

  • django/template/__init__.py

     
    641641                        current = current[int(bits[0])]
    642642                    except (IndexError, ValueError, KeyError):
    643643                        raise VariableDoesNotExist, "Failed lookup for key [%s] in %r" % (bits[0], current) # missing attribute
     644                except Exception, e:
     645                    if getattr(e, 'silent_variable_failure', False):
     646                        current = settings.TEMPLATE_STRING_IF_INVALID
     647                    else:
     648                        raise
    644649            del bits[0]
    645650    return current
    646651
Back to Top