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
Пример #2
0
    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)
Пример #3
0
 def build_absolute_uri(self, path=None):
     return build_absolute_uri(request.host_url, path)
Пример #4
0
 def build_absolute_uri(self, path=None):
     return build_absolute_uri(
         '{0}://{1}'.format(self.request.protocol, self.request.host), path)
Пример #5
0
 def build_absolute_uri(self, path=None):
     """Build absolute URI with given (optional) path"""
     return build_absolute_uri(self.request.host_url, path)