[Zope] DTML parameter to Python script
zope at dylanreinhardt.com
Thu Oct 2 17:15:55 EDT 2003
On Thu, 2003-10-02 at 12:03, Michael Bleijerveld wrote:
> url=context.REQUEST.URL1 + '/' + 'test'
> return url
Here's the problem.
Even though this code is called several times in one request, the URL1
property of REQUEST isn't going to change at any point during the
request. That explains why every time through your loop, you're getting
the same result.
It's not clear what you *mean* to have happen in this script... the only
line that seems to do anything is this one:
Which only re-names the "directory" variable, which I assume was a
parameter to the script. It's not clear what purpose this could serve.
Perhaps you meant for the generated URL to have something to do with the
current user and the directory name passed in. That might be:
url = '/'.join([context.REQUEST.URL1,username,directory])
Or something like that. If that doesn't help, maybe you could describe
what the script is *supposed* to return.
More information about the Zope