[z3-five] Weekend Experiments :)

Sidnei da Silva sidnei at awkly.org
Sat Jul 24 22:46:04 MEST 2004


Hello,

I've did some experiments while trying to start my project, and they
should continue over the next week. Was in doubt about checking them
into head, though all the tests pass. Made a branch at
http://codespeak.net/svn/z3/Five/branch/dc-experiments/

I've got at least one nit that I would like to discuss, the other
stuff should be pretty self-explanatory from the checkin messages.

I realized that __bobo_traverse__ is really a traversal hook, and
being so, should use an ITraverser adapter to do whatever it should do
'the zope3 way'. However, the default ITraverser fails to get views
when you don't use @@viewname. I propose the following:

- Rename five:viewable to five:traversable
- Remove the getView call from __bobo_traverse__, use just ITraverser.
- Implement a ITraverser that does lookups of views *and* resources
  even when @@ and ++resource++ are omitted.
- Enable five:traversable for some base classes (OFS.Folder and
  SimpleItem) by default.

With this, plus a browser:resourceDirectory (or whatever name we
choose) I plan to replace portal_skins by using only five templates
and resources (at least in my project).

Thoughts?

-- 
Sidnei da Silva <sidnei at awkly.org>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher

Enfeitado como santo milagroso.


More information about the z3-five mailing list