[Zope] Creating a namespace

Dieter Maurer dieter@handshake.de
Sun, 28 Jan 2001 21:55:24 +0100 (CET)


Stephan Richter writes:
 > I want to make my own name space with the following situation:
 > 
 > class X:
 > 
 >     attributes = {'foo': 'bar'}
 > 
 > x = X()
 > 
 > 
 > Then I want to use it like that:
 > 
 > <dtml-with x>
 >       <dtml-var foo>
 > </dtml-with>
 > 
 > The result should be : bar
 > 
 > I found out that I have to somehow use TemplateDict and InstanceDict, but I 
 > have no clue how to use it....Of course there is no documentation on any 
 > web site or in the Zope code itself....
It is not you that use TemplateDict or InstanceDict,
it is "dtml-with" that does this (for you).

However, you need to look at permissions.
Read Brian's "Upgrade to Zope 2.2" or the reference Zope security
paper.


Dieter