[Zope3-dev] Progress on TALES adapters

Jim Fulton jim@zope.com
Thu, 17 Apr 2003 07:03:51 -0400


At the UK sprint this week, Matt Hamilton and Chris Withers made some
initial progress on supporting "adapters" in TALES.  See
http://dev.zope.org/Zope3/NamespacesInTemplates.

Here's what got done:

- Moved generic (non-zope-specific) tales support into it's own package,
   zope.tales, since tales can be used without tal and metal.

- Added support for path segments of the form "name1:name2" except in
   the first segment.  The first name must be a Python identifier and
   must be assocuated with a callable object that is called with a single
   argument.

- Added a registry for predefined namespaces.  We made no attempt to provide
   local in-template namespace definitions.  I think that there are still a number
   of issues related to this that need to be worked out in the proposal.

- Added a zcml directive to configure a default namespaces.
   Configured a zope namespace with a single name (for now). This namespace is defined
   by the interface zope.app.interfaces.talesapi.IZopeTalesAPI.

I think it would be great if someone could work on adding a bunch of additional
functions to this API today.  I'm planning to make a milestone release tomorrow
and it would be cool if this could be included.

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (703) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org