获取授权跳转地址

        :return: URL 地址
482174
def authorize_url(self):
        
        redirect_uri = quote(self.redirect_uri, safe=b'')
        url_list = [
            self.OAUTH_BASE_URL,
            'oauth2/authorize?appid=',
            self.app_id,
            '&redirect_uri=',
            redirect_uri,
            '&response_type=code&scope=',
            self.scope
        ]
        if self.state:
            url_list.extend(['&state=', self.state])
        url_list.append('#wechat_redirect')
        return ''.join(url_list)
655545
def urlAt(self, index):
        
        if 0 <= index and index < len(self._stack):
            return self._stack[index][0]
        return ''
1148659
def url(self):
        
        if self._partition_key:
            base_url = self.design_doc.document_partition_url(
                self._partition_key)
        else:
            base_url = self.design_doc.document_url

        return '/'.join((
            base_url,
            '_view',
            self.view_name
        ))
785480
def url(self):
        """"""
        if self._url is None:
            self._url = request_uri(self.environ, include_query=1)
        return self._url
1205451
def _get_url(self, url):
        
        url = str(url)
        if url != 'default' and not '://' in url:
            url = ':///'.join(('file', url))
        return url
901687
def url(self):
        """"""
        return URL.format(http=self.web_proto, host=self.host, port=self.port)
1262
def get_forum_url(self):
        
        return reverse('forum:forum', kwargs={'slug': self.forum.slug, 'pk': self.forum.pk})
229978
def site_url(url):
    
    base_url = 'http://%s' % socket.gethostname()

    if server.port is not 80:
        base_url += ':%d' % server.port

    return urlparse.urljoin(base_url, url)
1366906
def get_site_url(site_url=None, request=None):
    
    site_url = site_url or settings.get('SITE_URL')
    if site_url:
        return site_url
    elif request:
        return '{}://{}'.format(request.scheme, request.get_host())
    else:
        raise Exception('Either pass `site_url`, '
                        'or set `SITE_URL` in settings, '
                        'or pass `request` object.')
762034
def get_base_url(self):
        
        return "http://{hostname}:{port}/{api}".format(
                hostname=self.hostname,
                port=self.port,
                api=self.api_version)
180837
def build_url(self):
        
        url = "%s/1.0/%s/%s/%s" % (
            self.request.endpoint.get_url(),
            self.request.api_object,
            self.request.api_method,
            to_hex(self.request.nonce)
        )
        return url
1159610
def get_web_auth_url(self):
        

        token = self._get_web_auth_token()

        url = "{homepage}/api/auth/?api_key={api}&token={token}".format(
            homepage=self.network.homepage, api=self.network.api_key, token=token
        )

        self.web_auth_tokens[url] = token

        return url
549730
def url(self):
        """"""
        scheme = self.scheme
        host = self.host
        path = self.path
        query = self.query
        port = self.port

        # normalize the port
        host_domain, host_port = Url.split_hostname_from_port(host)
        if host_port:
            port = host_port

        controller_path = ""
        if self.controller_info:
            controller_path = self.controller_info.get("path", "")

        u = Url(
            scheme=scheme,
            hostname=host,
            path=path,
            query=query,
            port=port,
            controller_path=controller_path,
        )
        return u
904883
def url(self):
        
        if self.id:
            url = "%s%s%s" % (self._url, self.id_url, self.id)
        else:
            url = None
        return url
777768
def get_url(self):
        # type: () -> STRING_TYPE
        """"""

        line = self.line
        try:
            parsed = URI.parse(line)
            line = parsed.to_string(escape_password=False, direct=False, strip_ref=True)
        except ValueError:
            pass
        else:
            self._parsed_url = parsed
            return line
        if self.vcs is not None and self.line.startswith("{0}+".format(self.vcs)):
            _, _, _parseable = self.line.partition("+")
            parsed = urllib_parse.urlparse(add_ssh_scheme_to_git_uri(_parseable))
            line, _ = split_ref_from_uri(line)
        else:
            parsed = urllib_parse.urlparse(add_ssh_scheme_to_git_uri(line))
        if "@" in self.line and parsed.scheme == "":
            name, _, url = self.line.partition("@")
            if self._name is None:
                url = url.strip()
                self._name = name.strip()
                if is_valid_url(url):
                    self.is_direct_url = True
            line = url.strip()
            parsed = urllib_parse.urlparse(line)
            url_path = parsed.path
            if "@" in url_path:
                url_path, _, _ = url_path.rpartition("@")
            parsed = parsed._replace(path=url_path)
        self._parsed_url = parsed
        return line
325229
def url(self):
        
        if not self.abstract:
            return "%s/documents/%i" % ("/".join(self._api.base_url.split("/")[:-2]), self.id)
559292
def urls(self):
        
        url_bases = self._url_module.url_bases
        unformatted_paths = self._url_module.url_paths

        urls = {}
        for url_base in url_bases:
            for url_path, handler in unformatted_paths.items():
                url = url_path.format(url_base)
                urls[url] = handler

        return urls