[Zope] Z Classes Tutorial: Rough Draft

Michel Pelletier michel@digicool.com
Fri, 7 May 1999 14:54:16 -0400


> -----Original Message-----
> From: Michel Pelletier [mailto:michel@digicool.com]
> Sent: Friday, May 07, 1999 2:47 PM
> To: Jordan B. Baker; Amos Latteier
> Cc: zope@zope.org
> Subject: RE: [Zope] Z Classes Tutorial: Rough Draft
> 
> 
> A better solution is to create a Python class (in a Product) and
> sprinkle a little ZClass magic pixie dust in the __init__.py file to
> make the Python class (PClass) subclassable by a ZClass.  
> Thus when you
> create your ZClass, you can specify that one of it's base 
> classes be the
> PClass that you made subclassable.  Now all of the PClasse's python
> methods are methods of the ZClass.
> 

Forgot to mention the pixie magic.

In the Products __init__.py file:

import MyModule

def intialize(context):
	context.registerBaseClass(MyModule.MyClass)

-Michel