[Grok-dev] Another sample app: Animal Tree
Luciano Ramalho
luciano at ramalho.org
Sun Jun 3 00:26:24 EDT 2007
Animal Tree is a version of the classic app used to demonstrate a tree
data structure. It is a hierarchical database of animals arranged by
distinguishing questions. Initially, it knows only one animal. But as
users interact with it, it learns more.
This example has a grok.Container subclass called Node. Leaf nodes are
empty and contain the name of one animal. Branch nodes contain a
question and two sub-nodes named 'yes' and 'no'.
Again, this example is at Googlecode. I'd like to contribute it to the
Zope SVN repo, but I need to know if you want it, and if so, where I
should put it.
The app.py file is here:
http://turing-club.googlecode.com/svn/grok/AnimalTree/trunk/src/animaltree/app.py
and the templates are here:
http://turing-club.googlecode.com/svn/grok/AnimalTree/trunk/src/animaltree/app_templates/
To check it out, create a grokproject and overwrite the src dir with
the result of this:
svn checkout http://turing-club.googlecode.com/svn/grok/AnimalTree/trunk/src
Cheers,
Luciano
More information about the Grok-dev
mailing list