[Zope] CoreSessionTracking's get looped in <dtml-in> does not work?

Milos Prudek prudek@nembv.cz
Mon, 6 Aug 2001 07:55:08 +0200


> It's a dictionary?  Are you sure?  If so, wouldn't you need:

Good question. It isn't. Sorry. It's a set of data received from form using 
":records". I don't know what it's called in Python. It looks as follows: 
[fname: "Chris", lname: "McDonough", fname: "John", lname: "Malkovich"]

You can iterate over it successfully: <dtml-in 
"data.get('writers')"><dtml-var fname></dtml-in>.

Hypothesis: the above <dtml-in> puts "fname" into DTML namespace. Therefore 
it should be accessible from Python Script using "context.":

<dtml-in "data.get('writers')"><dtml-var display></dtml-in>

display (Python Script):
  a="<b>"+context.fname+"</b>"
return a

But it fails with Attribute Error. I do not comprehend why it fails.

This looks like Level II Zope Zen, and it's more difficult than I thought.

-- 
Milos Prudek