def make_url_https(url):
 new_url = UrlParser(url)
 new_url.scheme = 'https'
 if (not new_url.hostname):
  new_url.hostname = request.host.lower()
 return new_url.unparse()

def make_url_https ( url ) : new_url = UrlParser ( url ) new_url . scheme = 'https' if ( not new_url . hostname ) : new_url . hostname = request . host . lower ( ) return new_url . unparse ( )
turn a possibly relative url into a fully-qualified https url .