def build_absolute_uri(self, path=None): host_url = self.request_host() if self.request: if not host_url.endswith('/'): host_url += '/' path = build_absolute_uri(host_url, path) return path
def build_absolute_uri(self, path=None): if settings.BASE_URL is None: base_url = '{0}://{1}'.format(self.request.protocol, self.request.host) else: base_url = settings.BASE_URL return build_absolute_uri(base_url, path)
def build_absolute_uri(self, path=None): return build_absolute_uri(request.host_url, path)
def build_absolute_uri(self, path=None): return build_absolute_uri( '{0}://{1}'.format(self.request.protocol, self.request.host), path)
def build_absolute_uri(self, path=None): """Build absolute URI with given (optional) path""" return build_absolute_uri(self.request.host_url, path)