Opened 17 years ago
Last modified 13 years ago
#4772 closed
urlresolver fails to resolve urls with unicode — at Initial Version
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | unicode | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Traceback (most recent call last):
File "C:\python24\Lib\site-packages\django\template\init.py" in render_node
- result = node.render(context)
File "C:\python24\Lib\site-packages\django\template\defaulttags.py" in render
- nodelist.append(node.render(context))
File "C:\python24\Lib\site-packages\django\template\init.py" in render
- return self.filter_expression.resolve(context)
File "C:\python24\Lib\site-packages\django\template\init.py" in resolve
- obj = resolve_variable(self.var, context)
File "C:\python24\Lib\site-packages\django\template\init.py" in resolve_variable
- current = current()
File "C:\python24\Lib\site-packages\django\utils\functional.py" in _curried
- return _curried_func(*(args+moreargs), dict(kwargs, morekwargs))
File "C:\python24\Lib\site-packages\django\db\models\base.py" in get_absolute_url
- return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.module_name), func)(self)
File "C:\python24\Lib\site-packages\django\db\models\init.py" in inner
- return reverse(bits[0], None, *bits[1:3])
File "C:\python24\lib\site-packages\django\core\urlresolvers.py" in reverse
- return iri_to_uri(u'/' + get_resolver(urlconf).reverse(viewname, *args, kwargs))
File "C:\python24\lib\site-packages\django\core\urlresolvers.py" in reverse
- return u.join([reverse_helper(part.regex, *args, kwargs) for part in self.reverse_dict[lookup_view]])
File "C:\python24\lib\site-packages\django\core\urlresolvers.py" in reverse_helper
- result = re.sub(r'\(([)]+)\)', MatchChecker(args, kwargs), regex.pattern)
File "C:\python24\lib\sre.py" in sub
- return _compile(pattern, 0).sub(repl, string, count)
File "C:\python24\lib\site-packages\django\core\urlresolvers.py" in call
- if not re.match(test_regex + '$', str(value)): # TODO: Unicode?
UnicodeEncodeError at /
'ascii' codec can't encode characters in position 0-7: ordinal not in range(128)