How do you import your own python class modules into Zope?

Here is what I've done:

In lib/python/Products I created a directory called MyScriptModules which
contains the following:

        First I import the required Modules:

        from Product.PythonScripts.Utility import allow_module, allow_class
        from AccessControl import ModuleSecurityInfo, ClassSecurityInfo
        from Globals import InitializeClass

        Then I add the security declarations:

        from ClassModule.ClassModule import Class1

I created a ClassModule directory in the Products directory and placed 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.

I have read somewhere that in order to create new Products in Zope you
have to meet some Zope API requirements like assigning certain class
attributes. Is this true? If so where can I find some documentation?

Is there a better way to import custom Python class modules than the way
described above?

Thanks in advance.

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to