mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user