Stopped converting match dict keys to bytestrings when resolving URLs.
Test suite is passing, but if any regression would be detected, we might replace smart_str by force_unicode.
This commit is contained in:
parent
1e6c3368f2
commit
2daf1ae8b9
|
@ -306,10 +306,8 @@ class RegexURLResolver(LocaleRegexProvider):
|
||||||
tried.append([pattern])
|
tried.append([pattern])
|
||||||
else:
|
else:
|
||||||
if sub_match:
|
if sub_match:
|
||||||
sub_match_dict = dict([(smart_str(k), v) for k, v in match.groupdict().items()])
|
sub_match_dict = dict(match.groupdict(), **self.default_kwargs)
|
||||||
sub_match_dict.update(self.default_kwargs)
|
sub_match_dict.update(sub_match.kwargs)
|
||||||
for k, v in sub_match.kwargs.iteritems():
|
|
||||||
sub_match_dict[smart_str(k)] = v
|
|
||||||
return ResolverMatch(sub_match.func, sub_match.args, sub_match_dict, sub_match.url_name, self.app_name or sub_match.app_name, [self.namespace] + sub_match.namespaces)
|
return ResolverMatch(sub_match.func, sub_match.args, sub_match_dict, sub_match.url_name, self.app_name or sub_match.app_name, [self.namespace] + sub_match.namespaces)
|
||||||
tried.append([pattern])
|
tried.append([pattern])
|
||||||
raise Resolver404({'tried': tried, 'path': new_path})
|
raise Resolver404({'tried': tried, 'path': new_path})
|
||||||
|
|
Loading…
Reference in New Issue