[Zope] How does DTML handle return variables from Python
Thomas B. Passin
Tue, 18 Jun 2002 15:45:57 -0400
> Yes, the Parameter List is set to st1,sub_type2.
Good. Python will return the concatenated parameters, so it must not be
getting them. I can't tell where they come from, but you must not be doing
something that you think you are doing.
BTW, if you are just concatenating them you won't even need a script:
<dtml-var "REQUEST.st1"><dtml-var "REQUEST.sub_type2">
<dtml-var st1><dtml-var sub_type2>
<dtml-var "st1 + sub_type2">
That's all you need (I'm assuming that these variables come from a
previously-submitted form, so that they are contained in the REQUEST).
Of course, if you aren't getting these parameters correctly, these simpler
forms won't work either.
Maybe you better explain in simple terms just how these two items are
getting to your page.
> -----Original Message-----
> From: firstname.lastname@example.org [mailto:email@example.com]On Behalf Of
> Thomas B. Passin
> Sent: Tuesday, June 18, 2002 3:02 PM
> To: 'Zope@Zope. Org' (E-mail)
> Subject: Re: [Zope] How does DTML handle return variables from Python
> [McDonnell, Larry]
> > I sorted of asked this question before but I am still hitting a wall. I
> > using this python code:
> > context, container, script, traverse_subpath
> > part_num = st1 + sub_type2
> > return part_num
> > But when "part_num" is returned it is blank. I test the script and
> > "part_num" has a return value.
> You have to include the two parameters in the script's parameter list,
> you will find in the Edit tab for the script. Otherwise they don't get
> passed to the script.