[Zope] ObjectManager example needed
Andre Meyer
a.meyer at hccnet.nl
Sun Nov 23 04:15:29 EST 2003
Dear Zopers
In continuing my search for help it seems like ObjectManager is what I
am looking for in order to have a large collection of different Python
objects in the same folder allowing for many links among them. I will
need to be able to select which kinds of items to show and sort them and
use them in forms. That should be standard behaviour, though, I would
expect.
Do you happen to have experience with ObjectManager and/or have a good
example that I can study?
The application I am developing is for a musician who currently has an
Excel sheet with more than 20.000 pieces of old music (1600-1900) where
each PieceOfMusic object refers to other objects like Composer,
OrchestralSetting, Instrument, Cast, Recording, Writer, etc. Those
need to become different kinds of Python objects that the PieceOfMusic
object can refer to in order to guarantee consistency. I have designed
an object model with all the classes, their attributes and relations in
a UML diagram, but now I need to convert the Excel sheet into Python
objects in Zope and make them accessible through ZPT pages and Python
methods based on this UML model.
I assume that I need a class MusicLibrary that is a direct subclass of
ObjectManager and a variety of classes that represent my application
classes and are all subclasses of ObjectManagerItem. Do you agree with
this? In the help about ObjectManager and ObjectManagerItem I miss a
method like manage_addObject. There are only manage_self,
manage_addProduct and manage_addFolder. But which method does the trick
of adding Python objects to my product's folder?
Any help is appreciated
best wishes
Andre Meyer
More information about the Zope
mailing list