-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jonas Melian wrote: > 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
We just did a tutorial for the Plone Symposium in Penn State which shows a traversal-based wiki and wiki pages (separate model classes): http://docs.repoze.org/bfg/tutorials/bfgwiki/index.html and the section where the models are defined: http://docs.repoze.org/bfg/tutorials/bfgwiki/definingmodels.html#looking-at-the-result-of-our-edits-to-models-py The traversal machinery uses '__getitem__', which is why the Wiki class derives from PersistentMapping, which is a dict-like class that plays well with the ZODB. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKJ+YM+gerLs4ltQ4RAnAbAKDIpYndH/BhSRhawYhznhC2of1RKgCePwQP Q/zyNeZq21lQ2QJgyfAxKfg= =tz63 -----END PGP SIGNATURE----- _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev