[Zope3-Users] Vocabularies beyond SimpleVocabulary
Anders Bruun Olsen
anders at bruun-olsen.net
Mon Jun 12 09:34:35 EDT 2006
Hi,
I am trying to figure out how to implement vocabularies.
My experimentation app is database of books which has a container for
people and one for books. What I need to do is be able to form relations
between these such that for a book I can choose from a list of the
people in the database who the author(s) is(/are).
The actual contentobjects and containers are SQLOS and
SQLObjectContainers, but that shouldn't really matter too much I should
think.
In my schema I then want to define a field which uses Choice that needs
to take it's list possible values from a container.
I am thinking I just need to make my containers implement
IVocabularyTokenized and my contentobjects implement
ITitledTokenizedTerm, but I can't seem to figure out the correct way of
doing this.
I have read both doc/schema/vocabularies.txt and the chapters on
vocabularies in Zope 3 Developers Handbook and Web Component Development
with Zope 3, but they all use rather static sources (mostly just
utilizing SimpleVocabulary) which doesn't really cover my needs.
Can anybody tell me the correct way to go about this when my source is a
container instance in the ZODB?
--
Anders
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/O d--@ s:+ a-- C++ UL+++$ P++ L+++ E- W+ N(+) o K? w O-- M- V
PS+ PE@ Y+ PGP+ t 5 X R+ tv+ b++ DI+++ D+ G e- h !r y?
------END GEEK CODE BLOCK------
PGPKey: http://random.sks.keyserver.penguin.de:11371/pks/lookup?op=get&search=0xD4DEFED0
More information about the Zope3-users
mailing list