See the forward below. This is very typical of the kind of e-mail I see on
the Zope list, which I joined recently. This poor guy forgot quotes so his
thing becomes a Zope name, rather than a Python expression embedded in
Zope. Putting the quotes in suddenly makes it an expression.
Can you say "arcane"?
I won't forward many of these messages. But I had to share at least one of
>Date: Tue, 14 Nov 2000 10:29:11 +0000
>From: Chris Withers <chrisw@...>
>Organization: New Information Paradigms
>To: "Burwell, Becky <burwell@...>" <burwell@...>
>CC: "'Curtis Maloney'" <curtis@...>,
> "'zope@...'" <zope@...>
>Subject: Re: [Zope] Form variables with same name as folder names
>List-Id: Users of the Z Object Publishing Environment <zope.zope.org>
>"Burwell, Becky " wrote:
> > >The simple answer: use REQUEST.form['FOO'] to refer to the
> > >form variable.
> > I just did an experiment and if I do the following my SQL Method:
> > <dtml-if REQUEST.form['FOO']>
> > this is never true.
>...because you're missing some " "
>REQUEST.form['FOO'] is a python expression.
><dtml-if REQUEST.form['FOO']> is short for <dtml-var
>so, unless you have a folder or document names 'REQUEST.form['FOO']', it
>will return false :-S
>What you want is <dtml-if "REQUEST.form['FOO']">, which is short for
>This evaluates expr as a python expression...
> > If I do:
> > <dtml-if "REQUEST.form['FOO']"> or <dtml-if
> > I get name errors with REQUEST being unknown.
>...an oddity of ZSQL methods :-( The REQUEST usually gets made available
>in the namespace, but in ZSQL methods, only the parameters your specify
>as 'arguments' get added to the namespace. At a guess, try adding
>REQUEST to the 'Arguments' list...
>Zope maillist - Zope@...
>** No cross posts or HTML encoding! **
>(Related lists -
> http://lists.zope.org/mailman/listinfo/zope-dev )