[Zope-dev] Accessing UMS0, UMS1, etc.

Robert Sander zope-dev@beteigeuze.cs.tu-berlin.de
Fri, 18 Feb 2000 10:03:09 +0100


Hi!

After some of my questions about accessing other objects were answered by the 
main question still hangs in the air (How do I access the object at 
http://localhost:8080/ ? ), my next question is:

In DTML-Documents or methods I have names like URL0 and URL1 in the namespace 
to call with dtml-var to easy generate links in the HTML code.

Where are these names when I want htem to use in a Product? I only found the 
PATH_TRANSLATED item of REQUEST.environ.

If I want to e.g. redirect a request to some objects above in the tree I do 
now somethinf like:

dirname, basename = os.path.split(REQUEST.environ.get("PATH_TRANSLATED"))
REQUEST.RESPONSE.redirect(dirname + "/logout?sess=%s&reason=%s" % (self.id, urllib.quote(self.reason)))

(This is for logging out of a session object.)

Could this be done more easily? I know that I have a logout method also in the 
child objects because of the namespace overlapping, but then soon the URL gets 
very long and unusable.

Greetings
-- 
Robert Sander                                 www.gurubert.de