def _language_from_cookie(self, request, supported):
cookie_value = request.COOKIES.get(settings.LANGUAGE_COOKIE_NAME)
with suppress(LookupError):
cookie_value = get_supported_language_variant(cookie_value)
if cookie_value and cookie_value in supported:
return cookie_value
评论列表
文章目录