Return the absolute URL to visit to delete me.
325641
def unsubscribe_url(self):
        """"""
        server_relative = ('%s?s=%s' % (reverse('tidings.unsubscribe',
                                                args=[self.pk]),
                                        self.secret))
        return 'https://%s%s' % (Site.objects.get_current().domain,
                                 server_relative)
952745
def full_url(self):
        """"""
        if self.needs_auth:
            netloc = '%s:%s@%s' % (self.username, self.password, self.netloc)
        else:
            netloc = self.netloc
        return urlunparse((
            self.scheme,
            netloc,
            self.path,
            self.params,
            self.query,
            self.fragment,
        ))
1264162
def _make_absolute(self, link):
        """"""

        # Parse the link with stdlib.
        parsed = urlparse(link)._asdict()

        # If link is relative, then join it with base_url.
        if not parsed['netloc']:
            return urljoin(self.base_url, link)

        # Link is absolute; if it lacks a scheme, add one from base_url.
        if not parsed['scheme']:
            parsed['scheme'] = urlparse(self.base_url).scheme

            # Reconstruct the URL to incorporate the new scheme.
            parsed = (v for v in parsed.values())
            return urlunparse(parsed)

        # Link is absolute and complete with scheme; nothing to be done here.
        return link
332791
def make_coursera_absolute_url(url):
    

    if not bool(urlparse(url).netloc):
        return urljoin(COURSERA_URL, url)

    return url
703442
def delete_url_link(obj, **kwargs):
    
    if hasattr(obj, 'get_delete_url_link'):
        return obj.get_delete_url_link(**kwargs)

    delete_url = obj.get_delete_url()
    return build_link(href=delete_url, **kwargs)
105903
def get_delete_url_link(self, text=None, cls=None, icon_class=None,
                            **attrs):
        """"""
        if text is None:
            text = 'Delete'

        return build_link(href=self.get_delete_url(),
                          text=text,
                          cls=cls,
                          icon_class=icon_class,
                          **attrs)
603185
def get_absolute_url(self):
        """"""

        # Determine if this configuration is on a stage
        if self.stage:
            # Stage specific configurations go back to the stage view
            url = reverse('projects_stage_view', args=(self.project.pk, self.stage.pk))
        else:
            # Project specific configurations go back to the project page
            url = self.project.get_absolute_url()

        return url
682891
function absoluteUrl (baseUrl, pathUrl) {
  if (pathUrl && pathUrl.slice(0, 4) !== 'http') {
    return [baseUrl, pathUrl].map((path) => {
      if (path[0] === '/') {
        path = path.slice(1)
      }
      if (path[path.length - 1] === '/') {
        path = path.slice(0, path.length - 1)
      }
      return path
    }).join('/')
  }

  return pathUrl
}
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
488088
def get_cancel_url(self):
        
        if self.cancel_view:
            url = self.bundle.get_view_url(self.cancel_view,
                                            self.request.user, {},
                                            self.kwargs)
        else:
            url = self.request.build_absolute_uri()

        return self.customized_return_url(url)
661092
def to_absolute(link)
      return nil if link.nil?

      valid_link = link.to_s.encode('utf-8', 'binary', invalid: :replace,
                                                       undef: :replace, replace: '')

      # remove anchor
      link =
        begin
          URI.encode(URI.decode(valid_link.gsub(/#[a-zA-Z0-9_-]*$/, '')))
        rescue URI::Error
          return nil
        end

      relative = begin
                   URI(link)
                 rescue URI::Error
                   return nil
                 end
      absolute = base ? base.merge(relative) : @url.merge(relative)

      absolute.path = '/' if absolute.path.empty?

      absolute
    end
489887
function _cleanURL(url) {
        var index = url.search(/[#\?]/);
        if (index >= 0) {
            url = url.substr(0, index);
        }
        return url;
    }
640244
def unshorten_url(short_url):
    """"""
    short_url = short_url.strip()
    if not short_url.startswith('http'):
        short_url = 'http://{0}'.format(short_url)

    try:
        cached_url = UnshortenURL.objects.get(short_url=short_url)
    except UnshortenURL.DoesNotExist:
        cached_url = UnshortenURL(short_url=short_url)
    else:
        return cached_url.long_url

    try:
        resp = urllib2.urlopen(short_url)
    except (
            urllib2.HTTPError, urllib2.URLError,
            httplib.HTTPException):
        return None

    if resp.code == 200:
        cached_url.long_url = resp.url
        cached_url.save()
        return resp.url
543283
def get_abs_url(self, rel_url):
        
        rel_url = rel_url.lstrip("/")
        return "{}://{}:{}/{}".format(self.url_scheme, self.host, self.port, rel_url)
681227
function getCurrentUrl() {
	var root = cleanRoot(),
		location = LOCATION(),
		loc = (location.pathname + location.search),
		index = loc.indexOf(root);

	return loc.substr(index + root.length);
}
808928
function(baseUrl, relUrl) {
        var i  = baseUrl.lastIndexOf('/');
        if (i === -1) {
            // this url is relative itself without any slashes
            return relUrl;
        }
        baseUrl = baseUrl.slice(0, i);
        return baseUrl + '/' + relUrl;
    }
8723
def base_url(self):
        
        return get_current_url(
            self.environ, strip_querystring=True, trusted_hosts=self.trusted_hosts
        )