Fixed #4044 -- Allowed callable views specifier to mix (i.e. not crash) with
prefix strings in URLConfs. Thanks, Vinay Sajip. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d9f1a0aaef
commit
1cae38c731
|
@ -22,5 +22,7 @@ def url(regex, view, kwargs=None, name=None, prefix=''):
|
|||
# For include(...) processing.
|
||||
return RegexURLResolver(regex, view[0], kwargs)
|
||||
else:
|
||||
return RegexURLPattern(regex, prefix and (prefix + '.' + view) or view, kwargs, name)
|
||||
if prefix and isinstance(view, basestring):
|
||||
view = prefix + '.' + view
|
||||
return RegexURLPattern(regex, view, kwargs, name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue