Ticket #8177: verbose_noreversematch.diff

File verbose_noreversematch.diff, 846 bytes (added by mrts, 16 years ago)
  • django/core/urlresolvers.py

     
    285285        try:
    286286            lookup_view = get_callable(lookup_view, True)
    287287        except (ImportError, AttributeError):
    288             raise NoReverseMatch
     288            raise NoReverseMatch("'%s' is not a callable." % lookup_view)
    289289        if lookup_view in self.reverse_dict:
    290290            return u''.join([reverse_helper(part.regex, *args, **kwargs) for part in self.reverse_dict[lookup_view]])
    291         raise NoReverseMatch
     291        raise NoReverseMatch("Reverse for '%s' not found." % lookup_view)
    292292
    293293    def reverse_helper(self, lookup_view, *args, **kwargs):
    294294        sub_match = self.reverse(lookup_view, *args, **kwargs)
Back to Top