[Zope-Coders] Re: Post traversal hook

Evan Simpson evan at 4-am.com
Thu Oct 2 13:48:03 EDT 2003


Christian Theune wrote:
> If nobody is against it, I would go forward and put that in (maybe I can
> figure out how to write a unit test) the HEAD (2.7 is way too far for
> now, hmm?)

It's too bad, but 2.7 is in feature freeze, so yes -- HEAD only.  Tests 
would be great!

> Evan: I would
> appreciate communication on that maybe some information on things that
> this patch still lacks.

??? I'm not sure what you mean.  For what it does, I consider it 
feature-complete.  It can handle post-traversal tasks of arbitrary 
complexity.

I currently use it in a site that runs a number of user-based SQL 
queries on almost every request.  Rather than calling the Script that 
performs these queries from every single published object in the site, I 
have an Access Rule:

## Script (Python) "through"
##bind container=container
##parameters=folder, request
##
request.post_traverse(container.preload_customer, ())

For other applications, that "()" could contain all sorts of information 
available during traversal.

Cheers,

Evan @ 4-am





More information about the Zope-Coders mailing list