[Zope] Problem with namespace

Dieter Maurer dieter at handshake.de
Thu Jun 16 13:24:50 EDT 2005


Ralph wrote at 2005-6-15 20:59 +0200:
> ...
>Method A in "report1" is rendering B in "util". B is rendering a ZSQL-object 
>in "sql" and in the tag <dtml-in>  is rendering C (python-method) in "util", 
>to render a table cell, but this isn't working, because E is unknown and I 
>don't know why.
>
>Example: 
>
>DTML-Method A:
><dtml-in "sql.list_mytable" prefix="pre">
> <dtml-var "util.B(index=pre_index)">

I assume "B" is a DTML object...

Then, you make one of the most frequent errors when dealing with
"DTML" objects. They have 2 essential positional arguments.
If you forget to pass them (usually as "None, _"), then
the called DTML object gets a new empty namespace...


For details, please the the "Calling DTML objects" section in

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>

-- 
Dieter


More information about the Zope mailing list