From 1cae38c7311d4a9862582b228170a51eed1a02f8 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 29 Apr 2007 09:41:46 +0000 Subject: [PATCH] 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 --- django/conf/urls/defaults.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django/conf/urls/defaults.py b/django/conf/urls/defaults.py index 13a74331d6..1e87ea708a 100644 --- a/django/conf/urls/defaults.py +++ b/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)