Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #4044 -- Allowed callable views specifier to mix (i.e. not cras…

…h) with

prefix strings in URLConfs. Thanks, Vinay Sajip.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5127 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1cae38c7311d4a9862582b228170a51eed1a02f8 1 parent d9f1a0a
@malcolmt malcolmt authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 django/conf/urls/defaults.py
View
4 django/conf/urls/defaults.py
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.