Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Jacob Kaplan-Moss authored November 07, 2006

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  django/core/urlresolvers.py
5  django/core/urlresolvers.py
@@ -21,7 +21,10 @@ class NoReverseMatch(Exception):
21 21
 def get_mod_func(callback):
22 22
     # Converts 'django.views.news.stories.story_detail' to
23 23
     # ['django.views.news.stories', 'story_detail']
24  
-    dot = callback.rindex('.')
  24
+    try:
  25
+        dot = callback.rindex('.')
  26
+    except ValueError:
  27
+        return callback, ''
25 28
     return callback[:dot], callback[dot+1:]
26 29
 
27 30
 def reverse_helper(regex, *args, **kwargs):

0 notes on commit afb2366

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