Use django.urls.translate_url for setlang compatibility

This commit is contained in:
2026-04-11 21:05:22 +02:00
parent d9ecab62e3
commit b6c0a18098

View File

@@ -2,10 +2,10 @@ from __future__ import annotations
from django.conf import settings from django.conf import settings
from django.http import HttpRequest, HttpResponse, HttpResponseRedirect from django.http import HttpRequest, HttpResponse, HttpResponseRedirect
from django.urls import translate_url
from django.utils.http import url_has_allowed_host_and_scheme from django.utils.http import url_has_allowed_host_and_scheme
from django.utils.translation import check_for_language from django.utils.translation import check_for_language
from django.utils.translation import get_language as _get_language from django.utils.translation import get_language as _get_language
from django.utils.translation import translate_url
from django.views.i18n import LANGUAGE_QUERY_PARAMETER from django.views.i18n import LANGUAGE_QUERY_PARAMETER
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.csrf import csrf_exempt