HTMLGen in Zope (Update)
Max M
maxm at mxm.dk
Mon Jul 22 04:47:22 EDT 2002
Justin Shaw wrote:
> Here is what I've done:
> 1. Moved HTMLgen directory to <ZopeDir>\lib\products
>
> 2. Added the __init__.py file:
> # __init__.py
> from Products.PythonScripts.Utility import allow_module, allow_class
> from AccessControl import ModuleSecurityInfo, ClassSecurityInfo
> from Globals import InitializeClass
>
> import HTMLgen
>
> allow_module("HTMLgen")
>
> 3. Restarted Zope
>
> I can see HTMLgen in Zope:
> Product at /Control_Panel/Products/HTMLgen
>
> But my script bombs at:
> import HTMLgen
> Error Value: No module named HTMLgen
You are doing it way more complicated than it need to be.
Just put HTMLgen in <ZOPE>/lib/python/
and then, asuming it is a normal module:
import HTTMLgen
... etc.
There is no need to call allow_module or anything special to use a
module in Zope. And you certainly should not install it as a product as
it does no through the web management.
regards Max M
More information about the Python-list
mailing list