[ZPT] Accessing class attribute from ZPT

John Morton jwm@plain.co.nz
Fri, 18 Jan 2002 13:37:14 +1300

On Friday 18 January 2002 11:49, Dieter Maurer wrote:
> John Morton writes:
>  > I have a product that contains a class called ITProfile which has a
>  > class attribute called default_profession_types which is used to fill a
>  > select box when editing instances of the class. I want to be able to
>  > access those defaults from a page unrelated to the product directly; a
>  > customized search page as it happens.
> Your options:
>   *  access them via an instance
>   *  search the mailing list archives: you will find an
>      (unintuitive) solution (from me) to access the attribute
>      inside the class
> Like many other so called OODBs, ZODB is *NOT* a true object oriented
> database but just an object state database. It manages only the state,
> it does not store the classes. Any changes to classes are lost
> after a restart (This does not apply to ZClasses, which are
> objects and behave like classes).

I see that CMF tackles the problem for site wide metadata vocabularies by 
having a portal tool manage the vocabs. As I'm working with CMF I might just 
make the product in question use that as it's vocabulary source and manager.