Ticket #17076: helpful_reverse_1_4.diff

File helpful_reverse_1_4.diff, 800 bytes (added by wilfred@…, 13 years ago)

updating patch to work correctly against trunk

  • django/core/urlresolvers.py

    diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py
    index a253319..2d9d5be 100644
    a b class RegexURLResolver(LocaleRegexProvider):  
    388388            lookup_view_s = "%s.%s" % (m, n)
    389389        else:
    390390            lookup_view_s = lookup_view
     391
     392        patterns = [pattern for (possibility, pattern, defaults) in possibilities]
    391393        raise NoReverseMatch("Reverse for '%s' with arguments '%s' and keyword "
    392                 "arguments '%s' not found." % (lookup_view_s, args, kwargs))
     394                "arguments '%s' not found. %d pattern(s) tried: %s" %
     395                             (lookup_view_s, args, kwargs, len(patterns), patterns))
    393396
    394397class LocaleRegexURLResolver(RegexURLResolver):
    395398    """
Back to Top