1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

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

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)