Ticket #5904: reverse_bug.diff

File reverse_bug.diff, 901 bytes (added by Chris Beaven, 17 years ago)
  • django/core/urlresolvers.py

     
    218218                    for key, value in pattern.reverse_dict.iteritems():
    219219                        self._reverse_dict[key] = (pattern,) + value
    220220                else:
    221                     self._reverse_dict[pattern.callback] = (pattern,)
     221                    try:
     222                        self._reverse_dict[pattern.callback] = (pattern,)
     223                    except ViewDoesNotExist:
     224                        # If the callback can't be found, just leave it out and
     225                        # continue.
     226                        pass
    222227                    self._reverse_dict[pattern.name] = (pattern,)
    223228        return self._reverse_dict
    224229    reverse_dict = property(_get_reverse_dict)
Back to Top