[Zope] publish() hook
Stadtverwaltung Schwarzenberg
Stadtverwaltung Schwarzenberg" <stadtverwaltung@schwarzenberg.de
Tue, 23 Apr 2002 10:56:29 +0200
Hi there!
I'd like to add a little functionality to my ZPublisher.Publish.publish
method. So I created a new Product and in the __init__.py file of ths
product I put code like this:
import ZPublisher
def publish_new(same fingerprint as ZPublisher.Publish.publish):
response = ZPublisher.Publish.publish_old(paramaters)
#
#aditional functionality
#
return respone
ZPublisher.Publish.publish_old = ZPublisher.Publish.publish
ZPublisher.Publish.publish = publish_new
Using this code Zope starts up w/o error but I don't see any effects of my
new publish method. In fact - even if there is an error in my additional
code it never raises an exception so I figure that my new pubish method
never gets called.
Some additional info: I'm running Zope 2.4.1 on a WinNT machine.
Can anyone help me out? Please?
Thanks
Falk