[Zope] different namespaces in a python script by calling
it by<dtml-var xxx> and <dtml-var "xxx()">?
Grégoire Weber
gregoire.weber@switzerland.org
Thu, 19 Jul 2001 18:55:36 +0200
Sorry I wanted to add the following note to the previous
e-mail but it took me longer than 10 minutes to find it
so my e-mail client sent the queued e-mail before
automatically :-)
Zope Book pdf version page 137
Namespace
The Namespace binding is left blank by default. This is an
advanced variable that you will not need for any of the
examples in this book. If your script is called from a DTML
Method, and you have chosen a name for this binding, then
the named variable contains the DTML namespace explained in
Chapter 7, "Advanced DTML". Also, if this binding is set,
the script will search for its parameters in the DTML
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
namespace when called from DTML without explicitly passing
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
any arguments.
^^^^^^^^^^^^^^
But why do I have to do the '_=_' thing? Bug?
Greg
> > <dtml-var xxx> --> foo
>
> This is the equivalent of:
> <dtml-var "xxx(_.None,_)">
>
> > <dtml-var "xxx()"> --> sort_order not defined
>
> ...so this is obviously wrong sicne you're not passing the namespace.
>
> This is confusing, isn't it?
_____________________________________
Grégoire Weber
mailto:gregoire.weber@switzerland.org