Ticket #2875: urlresolver-getmodfunc.diff
File urlresolver-getmodfunc.diff, 582 bytes (added by , 18 years ago) |
---|
-
django/core/urlresolvers.py
20 20 def get_mod_func(callback): 21 21 # Converts 'django.views.news.stories.story_detail' to 22 22 # ['django.views.news.stories', 'story_detail'] 23 dot = callback.rindex('.') 23 try: 24 dot = callback.rindex('.') 25 except ValueError: 26 return callback, '' 24 27 return callback[:dot], callback[dot+1:] 25 28 26 29 def reverse_helper(regex, *args, **kwargs):