def build_absolute_uri(location, is_secure=False):
# type: (str, bool, saleor.site.models.SiteSettings) -> str
host = Site.objects.get_current().domain
current_uri = '%s://%s' % ('https' if is_secure else 'http', host)
location = urljoin(current_uri, location)
return iri_to_uri(location)
评论列表
文章目录