mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed another case of reverse URL resolving that wasn't working.
This is a similar situation to that fixed in r9087. We weren't merging multiple levels of include() calls together correctly. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9099 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -158,12 +158,12 @@ class RegexURLResolver(object):
|
||||
p_pattern = p_pattern[1:]
|
||||
if isinstance(pattern, RegexURLResolver):
|
||||
parent = normalize(pattern.regex.pattern)
|
||||
for name, (matches, pat) in pattern.reverse_dict.iteritems():
|
||||
new_matches = []
|
||||
for piece, p_args in parent:
|
||||
new_matches.extend([(piece + suffix, p_args + args)
|
||||
for (suffix, args) in matches])
|
||||
self._reverse_dict.appendlist(name, (new_matches, p_pattern + pat))
|
||||
for name in pattern.reverse_dict:
|
||||
for matches, pat in pattern.reverse_dict.getlist(name):
|
||||
new_matches = []
|
||||
for piece, p_args in parent:
|
||||
new_matches.extend([(piece + suffix, p_args + args) for (suffix, args) in matches])
|
||||
self._reverse_dict.appendlist(name, (new_matches, p_pattern + pat))
|
||||
else:
|
||||
bits = normalize(p_pattern)
|
||||
self._reverse_dict.appendlist(pattern.callback, (bits, p_pattern))
|
||||
|
||||
Reference in New Issue
Block a user