[Repoze-dev] (repoze.bfg) Adding several models

2009-06-04 Thread Jonas Melian
Is possible to have several models? If it's so, how are they returned
from root?


repoze.bfg: http://static.repoze.org/bfgdocs/narr/project.html#models-py

-- 
http://www.fastmail.fm - Faster than the air-speed velocity of an
  unladen european swallow

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


[Repoze-dev] make repoze dists more buildout friendly

2009-06-04 Thread Jens W. Klein
Hi,

I'am using buildout and repoze.bfg. It worked fine until i came to the 
point where i tried to integrate repoze.what.

repoze.what is on pypi, repoze.who is on an own index server. Now i came 
up with a solution (please please document this somewhere), here the 
minimal buildout:

--snip-
[buildout]
parts = instance
find-links = http://dist.repoze.org/bfg/1.0/

[instance]
recipe = repoze.recipe.egg:scripts
eggs = repoze.what repoze.bfg
--/snip-

The major disadvantage over using the index= approach is: Version pinning 
is needed to be done manually (the extension buildout.dumppickedversions 
helps a lot here).

Why not put a version.cfg file at http://dist.repoze.org/bfg/1.0/
version.cfg for all files in there? It should be easy to auto-create such 
from the files in the directory. This would make repoze.bfg distributions 
more buildout-friendly and also documents explizit the dependend versions 
used in the specific bundle.

Additional i learned today the major difference between find-links and 
index in buildout (at the end in setuptools), as wiggy said:

   find-links= expects a directory with files in it,  index= expects a
directory with a subdirectory for every package

Odd enough, but its setuptools.

regards
-- 
Jens W. Klein - Klein  Partner KEG - BlueDynamics Alliance

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


Re: [Repoze-dev] (repoze.bfg) Adding several models

2009-06-04 Thread Paul Everitt

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