mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Corrected [13479], accounting for unnamed urls that are instances of classes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13497 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -41,7 +41,12 @@ class ResolverMatch(object):
|
||||
else:
|
||||
self.namespaces = []
|
||||
if not url_name:
|
||||
url_name = '.'.join([ func.__module__, func.__name__ ])
|
||||
if not hasattr(func, '__name__'):
|
||||
# An instance of a callable class
|
||||
url_name = '.'.join([func.__class__.__module__, func.__class__.__name__])
|
||||
else:
|
||||
# A function
|
||||
url_name = '.'.join([func.__module__, func.__name__])
|
||||
self.url_name = url_name
|
||||
|
||||
def namespace(self):
|
||||
|
||||
Reference in New Issue
Block a user