Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #2875: made urlresolvers.get_mod_func() deal with non-qualified…

… callbacks better. Thanks, Matt McClanahan.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4047 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit afb23664304a6423a9c7c326343faeae7ef0e035 1 parent a1199d8
@jacobian jacobian authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/core/urlresolvers.py
View
5 django/core/urlresolvers.py
@@ -21,7 +21,10 @@ class NoReverseMatch(Exception):
def get_mod_func(callback):
# Converts 'django.views.news.stories.story_detail' to
# ['django.views.news.stories', 'story_detail']
- dot = callback.rindex('.')
+ try:
+ dot = callback.rindex('.')
+ except ValueError:
+ return callback, ''
return callback[:dot], callback[dot+1:]
def reverse_helper(regex, *args, **kwargs):

0 comments on commit afb2366

Please sign in to comment.
Something went wrong with that request. Please try again.