[Zope3-Users] Re: Vocabularies beyond SimpleVocabulary

2006-06-13 Thread Piotr Chamera
Philipp von Weitershausen wrote: Piotr Chamera wrote: I have removed proxies because I stored selected objects in attribute of another object with forms generated from schema. But I probably can remove proxy in set method of that attribute (property) or ... what else can I store as reference t

[Zope3-Users] Re: Vocabularies beyond SimpleVocabulary

2006-06-12 Thread Philipp von Weitershausen
Piotr Chamera wrote: > Philipp von Weitershausen wrote: >> Piotr Chamera wrote: >>> def getVocabulary(context, items_container, title_field): >>>list = [] >>>root=zapi.getRoot(context) >>>for (oid, oobj) in root.get("books").get(items_container).items(): >>>obj = removeAllProxie

Re: [Zope3-Users] Re: Vocabularies beyond SimpleVocabulary

2006-06-12 Thread Piotr Chamera
Philipp von Weitershausen wrote: Piotr Chamera wrote: def getVocabulary(context, items_container, title_field): list = [] root=zapi.getRoot(context) for (oid, oobj) in root.get("books").get(items_container).items(): obj = removeAllProxies(oobj) Don't remove (security) proxies h

[Zope3-Users] Re: Vocabularies beyond SimpleVocabulary

2006-06-12 Thread Philipp von Weitershausen
Piotr Chamera wrote: > I am just working on similar code. I'm beginner in zope and python, so I > post this code for improvements from other users. I have defined > simple "factory" for my vocabularies (root folder is hardvired in the > code, it gets subfolder by name and creates title from given a