'The Public URL for the site - for use in email links, etc'

def get_base_public_url(self):

    public_url = self.base.get('public_url')
    if (not public_url):
        env = current.request.env
        scheme = env.get('wsgi_url_scheme', 'http').lower()
        host = (env.get('http_host') or '127.0.0.1:8000')
        self.base.public_url = public_url = ('%s://%s' % (scheme, host))
    return public_url
