[Zope] Importing Custom Python Classes

D. Bickle dbickle at uvic.ca
Thu Feb 19 15:17:07 EST 2004


Hmm...The module seems to be importing fine at the python command line.
Zope complains that it is unauthorized so I am assuming it is being
imported.

On Thu, 19 Feb 2004, Dieter Maurer wrote:

> 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