[Zope] adding DTMLMethods to a python product

Bob Shelton polaris@infinity.erf.net
Wed, 11 Jul 2001 04:53:29 -0500


> Oh and you need to:

> import Products

> for it to work ;-)

thanks.

heh.  i also spent alot of yesterday trying to figure out how to add
DTMLMethods to my product so they appeared in the contents (so to be
'default' DTMLMethods that the user can override).

i came up with something like:
DTMLMethod.addDTMLMethod(self,'index_html','',open(os.path.join(Common.package_home(globals()),'dtml/index_html_Forum.dtml')))

there must be an easier way, but i don't know it.
is there any way to wrap the created message in my class' aquisition
space (i am not sure of the correct term)?

-bob