On Jun 4, 2009, at 8:26 AM, Malthe Borch wrote:

> 2009/6/4 Jonas Melian <jo...@mailup.net>:
>> Is possible to have several models? If it's so, how are they returned
>> from root?
>
> The default object traversal uses the ``__getitem__`` method to
> traverse to subobjects. These could be instances of "other" models.

The lxmlgraph tutorial I wrote (which should probably be deprecated)  
shows how traversal can get very custom:

   http://docs.repoze.org/bfg/tutorials/lxmlgraph/step02.html#module-models-py

In that I use the identifier as an argument to an XPath inside a  
__getitem__.

--Paul
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to