[ZPT] preload ZPT namespace

alan runyan runyaga at runyaga.com
Mon Jan 26 12:17:21 EST 2004


Hi.

We are doing quite a bit of defines in a pagetemplate
and I was wondering if you could sort of merge a
dictionary into the ZPT execution namespace.  I know
this is risky but I was just wondering if its possible.

We have a method that returns back a dictionary.
I would like to load this into the global namespace for
ZPT.  You could put this into the request - but I think
its dirty.  I would like it only in the zpt namespace.  Also
another question is.. if I want to access zpt namespace
or pass it into a script.  Is that possible?  I would most
likely *never* mutate it, just reference variables that
have been assigned.

Is this reasonable?

One of things we often find in PythonScript is that we
are constantly looking up tools where they are already
referenced in ZPT.  This is unnecessary.  If we could
pass in the namespace that would work and probably
cut out lots of unnecessary traversal in Plone.

If the request is the best place to do this; thats fine.
Just want to know if this is possible.

cheers,
alan




More information about the ZPT mailing list