[Zope] DTML eq PythonScripts

Dieter Maurer dieter@handshake.de
Wed, 11 Jul 2001 20:54:47 +0200 (CEST)


salvadorindali@gmx.de writes:
 > I tried the example from the book
 > [exhibit=anotherFolder.manage_clone(thisFolder.ThreadMuster,'name')],
 > slightly
 > changed. I 'd like to copy the cloned_object to another folder.
 > But Zope 2.3.2 gives a name error . He can't find anotherFolder.
 > In DTML almost the same is working.
In DTML, you have the namespace magic that automatically
resolves name to objects.

In Python Scripts, you do not have this magic, just the local
namespace of the function.

Use "context.anotherFolder" rather than "anotherFolder".


Dieter