Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Made NoReverseMatch exceptions more helpful. Thanks, mrts

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 50e6928c5bcf03b7f18f26d3d9af50295a7bc46f 1 parent 4747347
@spookylukey spookylukey authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/core/
4 django/core/
@@ -285,10 +285,10 @@ def reverse(self, lookup_view, *args, **kwargs):
lookup_view = get_callable(lookup_view, True)
except (ImportError, AttributeError):
- raise NoReverseMatch
+ raise NoReverseMatch("'%s' is not a callable." % lookup_view)
if lookup_view in self.reverse_dict:
return u''.join([reverse_helper(part.regex, *args, **kwargs) for part in self.reverse_dict[lookup_view]])
- raise NoReverseMatch
+ raise NoReverseMatch("Reverse for '%s' not found." % lookup_view)
def reverse_helper(self, lookup_view, *args, **kwargs):
sub_match = self.reverse(lookup_view, *args, **kwargs)
Please sign in to comment.
Something went wrong with that request. Please try again.