Skip to content

Commit

Permalink
Fixed #4044 -- Allowed callable views specifier to mix (i.e. not cras…
Browse files Browse the repository at this point in the history
…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
malcolmt committed Apr 29, 2007
1 parent d9f1a0a commit 1cae38c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion django/conf/urls/defaults.py
Expand Up @@ -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)

0 comments on commit 1cae38c

Please sign in to comment.