27 Jul
2001
27 Jul
'01
7:47 p.m.
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