[Zope] Passing back from a Python script

Dylan Reinhardt zope@dylanreinhardt.com
18 Apr 2003 16:56:58 -0700


> What I've been doing so far is: <dtml-if "User=='Bob'"><dtml-var 
> "REQUEST.set('userlist',User)"></dtml-if>, but this has a serious 
> limitation.  The <dtml-var "REQUEST.set('this', that)"> sets the 
> variable, but it overwrites what it is setting,

This:

<dtml-call "REQUEST.set('user_list', [])">

<dtml-call "user_list.append('user1')">
<dtml-call "user_list.append('user2')">

<dtml-in user_list prefix=list>
   <dtml-var list_item>
</dtml-in>

Produces:

user1
user2

HTH,

Dyaln