[Zope3-Users] How to determine server URL without request
Alek Kowalczyk
thealx at poczta.onet.pl
Tue Apr 24 09:57:02 EDT 2007
Hello,
I have a zope.scheduler task, which monitors my ZoDB in a loop and sends e-mail
messages about some of the objects found.
The e-mail message should contain URL to allow the receiver to access more
details about the object through the web browser. The mail message is created as
a browser view adapted on TestRequest and my object.
But I have a problem how to determine base URL and skin of the web server. Up to
now I just hardcoded that in the code creating the view, but this is asking for
troubles:
base_url = "http://myserver:8080/++skin++MySkin"
view = getMultiAdapter((object, TestRequest(SERVER_URL=base_url)),
name="message.html")
How to determine my web server URL without having any request around?
More information about the Zope3-users
mailing list