Removed unneeded iri_to_uri() call in reverse().

_reverse_with_prefix() already quotes using a stricter subset of the
safe characters used by iri_to_uri().
This commit is contained in:
Florian Apolloner 2020-10-04 14:58:54 +02:00 committed by Carlton Gibson
parent 342a41740d
commit 75d2af2c89
1 changed files with 1 additions and 2 deletions

View File

@ -2,7 +2,6 @@ from urllib.parse import urlsplit, urlunsplit
from asgiref.local import Local
from django.utils.encoding import iri_to_uri
from django.utils.functional import lazy
from django.utils.translation import override
@ -84,7 +83,7 @@ def reverse(viewname, urlconf=None, args=None, kwargs=None, current_app=None):
if ns_pattern:
resolver = get_ns_resolver(ns_pattern, resolver, tuple(ns_converters.items()))
return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
return resolver._reverse_with_prefix(view, prefix, *args, **kwargs)
reverse_lazy = lazy(reverse, str)