[Zope] RE: How to put a dictionary in REQUEST?

M. Adam Kendall mak@kha0s.org
16 Aug 2001 22:25:04 -0400


Try this:
<dtml-call "REQUEST.set('colorAssignment',{})">
<dtml-call "colorAssignment.update({Subject:nextColor})">


On 16 Aug 2001 18:41:31 -0700, Loren Stafford wrote:
> 
> OK. I didn't describe the problem very well. The REQUEST object does have
> dictionaries in it, and you can add a dictionary...
> 
>   <dtml-call "REQUEST.set('colorAssignment',{})">
> 
> ... but how can you add keys to a dictionary in REQUEST using DTML?
> 
> Clearly you can't
>   <dtml-call "REQUEST.set('colorAssignment[Subject]',nextColor)">
> 
> The perlish ...
>   <dtml-call "colorAssignment.append[Subject,nextColor]">
> ...doesn't work either.
> 
> 
> > -----Original Message-----
> > From: Loren Stafford [mailto:lstafford@morphics.com]
> > Sent: Thursday, August 16, 2001 18:20
> > To: zope@zope.org
> > Subject: How to put a dictionary in REQUEST?
> >
> >
> > I just discovered that the REQUEST object doesn't support
> > dictionaries. Right?
> >
> > So, given that I'm writing DTML because I'm in the middle of a
> > calendar tag, how can I create a dictionary for the duration of a
> > request and add items to it?
> >
> > -- Loren
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> 
-- 
"There's never enough time to do        |    M. Adam Kendall
 all the nothing you want."             |    mak@kha0s.org
 -Bill Watterson (Calvin and Hobbes)    |    http://www.zopelabs.com