[Zope-dev] Python Product as DataSkin

Michael R. Bernstein webmaven@lvcm.com
Sun, 18 Feb 2001 21:49:16 -0800


"Phillip J. Eby" wrote:
> 
> At 12:51 PM 2/18/01 -0800, Michael R. Bernstein wrote:
> >I have an existing Python Product that I would like to use
> >as a DataSkin in a Rack.
> >
> >What do I need to change (import/subclass) in order to use
> >it in this way?
> >
> 
> from ZPatterns.DataSkins import DataSkin
> 
> class MyClass(DataSkin,...all other bases...):

Ok, assuming that the 'normal' instantiation is either
solved or a non-issue, do I need to do anything special to
get the newItem() method to call my products manage_add
method?

The manage_add method takes an id, an optional title, and an
uploaded file.

When I try passing these to newItem(), it complains that
it's getting "too many arguments, expected 2 got 4", but
when I only pass the id, it complains that "not enough
arguments; expected 4, got 2"

As far as I can determine, the fourth/second argument that
it gets in each case is 'self'.

So what do I do next?

Michael Bernstein.