Short answer: not that I can see. You have to build it. Python gurus will have a better answer I am sure.
The long answer and some thoughts about web2py and absolute paths:
Since URL only builds relative paths, it won't build the complete path, especially the https bit. I am sure the gurus have a better answer but depending on your setup, you can build it. It's just not so fun. If you run the
status app you can check a few variables. If you are not running behind a host you can use something like:
path='https://%s/%s' % (request.env.host,URL(a="init", c="accounts", f="private_link"))
redirect(path)
Perhaps if URL had a 'absolute' option, and/or a 'secure' option. Or even a 'protocol'.
redirect(URL(a="init", c="accounts", f="private_link", secure=True))
I'm not sure but this would return have to return an absolute URL out of necessity since it needs to build it from the 'https'.
If it were wrapped in the URL function, it would be nice but it might require something like a SITE variable.
redirect(URL(a="init", c="accounts", f="private_link", secure=True, url_base=SITE))
In my case I am on a proxy I actually don't use request.env.host. I could use request.env.http_x_forwarded_host. You can see
Massimo's status app as an example of that.
Is there any other way to get the actual site? I may actually need this so In my case I would probably end up putting something in my applications.init.models so that it checks:
SITE=http_host if not http_x_forwarded_host else http_x_forwarded_host
But there are a lot of ways web2py can be deployed so I wouldn't know how to figure that for all cases. :-P