[Zope] Importing Custom Python Classes

Dieter Maurer dieter at handshake.de
Thu Feb 19 14:57:29 EST 2004


D. Bickle wrote at 2004-2-18 16:01 -0800:
>How do you import your own python class modules into Zope?
> ...
>	Then I add the security declarations:
>
>	from ClassModule.ClassModule import Class1
>	allow_module('ClassModule.ClassModule')
>	allow_class(Class1)
>
>
>I created a ClassModule directory in the Products directory and placed
>ClassModule.py class module in it.
>
>I then rebooted the Zope server.
>
>Now everytime I try this:
>	from ClassModule.ClassModule import Class1
>I get this error:
>	import of ClassModule.ClassModule is unauthorized.


Are you sure that your module is imported?
If not, your security declaration are never executed
(and therefore ineffective).

-- 
Dieter



More information about the Zope mailing list