[Zope3-Users] Publisher events on response

Jim Fulton jim at zope.com
Tue May 3 14:40:55 EDT 2005

Paul Everitt wrote:
> Hi.  Are there any events, current or planned, that can be observed  to 
> modify the response?

Yes. They are planned.

> Let's say I want to write a little function to transform every HTML  
> page that gets returned on a site.   (Perhaps I want to hack it to  make 
> it adhere to the corporate identity from the customer.)
> In Apache2 there is a concept of a filter:
>   http://www.apachetutor.org/dev/#filter
> modpython supports this:
>   http://www.onlamp.com/pub/a/python/2003/10/02/mod_python.html
> At the Castle Sprint, Jim talked about the possibility of having  events 
> on the publisher, to allow folks to hook in and perform  processing on 
> results.  Any news on this?

No news, other than:

- I'm not sure whether this should be done with
   subscribers, adapters, or some combination. :)

- I've started down the road to a much more event-driven
   publication model in my bobo branch:


   This still isn't what you (and I want) wrt to output processing.

I really haven't had much time to think about this.  My rough thinking
so far:

- The result of traversal should be adapted to a publiing interface
   of some sort.

- The result of the above adaptation (or some method of the same) should
   be called to produce a publishing result.

- The result of the call should then be adapted to some final interface.
   The result of this adaptation should be handed to the response.
   (Or maybe this step should be done by the response when it is
   given the result of the call.)

I think this last step would allow you to hook something up.

<Jim waves hands ...)

I'd love to get suggestions if people have any ideas of how
this might work.


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

More information about the Zope3-users mailing list