[Zope-dev] Python Based DataSkins and Propertysheets

Steve Alexander steve@cat-box.net
Mon, 12 Feb 2001 08:22:40 +0000


Johan Carlsson wrote:

> Hi, 
> I am trying to figure out ZPatterns and because I rather work with Python Products when with Zclasses I am trying to convert the EmployZ product to Python.
> So far I got half the way there, the Rack recognizes the DataSkin
> And on newItem in the Specialist it a new slot gets created and I can see them and their ID.
> 
> Now the problem is creating a Propertysheet in the DataSkin that gets stored in the Rack.

The attributes of a Persistent DataSkin will get stored in the Rack without too much extra work.


> class EmployX(
>         DataSkin,
>         #VirtualSheets,
> ): 

You need to derive EmployX from DataSkin and some Zope persistent class such as SimpleItem. Otherwise, it won't be persistent.


--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net