[Zope-dev] cascading dictionaries
Michel Pelletier
michel@digicool.com
Fri, 27 Jul 2001 12:47:14 -0700
Reda Guermas wrote:
>
> I am building a dictionary in an external method:
>
> dict = {'user_name':'jim', 'password':'powers'}
>
> I also add it to the request:
> container.REQUEST.set('results', dict)
>
> The problem is that I am unable to retrieve the results dictionary on
> my dtml document. When I do: <dtml-var "REQUEST.get('results')"> I
> can see my dictionary but I am not able to get the individual values
> in the dictionary.
You're simply not doing it right:
<dtml-var "REQUEST.get('results')['user_name']">
Don't post question like this to zope-dev, use the regular zope list.
And you should read the Python tutorial:
http://www.python.org/doc/current/tut/tut.html
-Michel