Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 2daf1ae8b9676c809ed948202cbd7bec4dd62740 1 parent 1e6c336
@claudep claudep authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 django/core/urlresolvers.py
View
6 django/core/urlresolvers.py
@@ -306,10 +306,8 @@ def resolve(self, path):
tried.append([pattern])
else:
if sub_match:
- sub_match_dict = dict([(smart_str(k), v) for k, v in match.groupdict().items()])
- sub_match_dict.update(self.default_kwargs)
- for k, v in sub_match.kwargs.iteritems():
- sub_match_dict[smart_str(k)] = v
+ sub_match_dict = dict(match.groupdict(), **self.default_kwargs)
+ sub_match_dict.update(sub_match.kwargs)
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])
raise Resolver404({'tried': tried, 'path': new_path})
Please sign in to comment.
Something went wrong with that request. Please try again.