[Zope] Script execute with every request

Jonathan dev101 at magma.ca
Mon Jul 24 08:55:46 EDT 2006


You have not mentioned what your use case is or what data you want to store, but another possible option would be to have every url call the same script; that script then logs/stores the desired information and then passes control (redirect or direct call) to the target routine (information about the target routine can be embedded within the url so that the initially invoked script can appropriately route control).


Jonathan
  ----- Original Message ----- 
  From: Joshua Burvill 
  To: 'David H' 
  Cc: zope at zope.org 
  Sent: Monday, July 24, 2006 12:01 AM
  Subject: RE: [Zope] Script execute with every request


  Ok, so I could put a <dtml-call … > into my standard_html_header, and any redirects do them with a call to Dieters script (which may not work with future zope versions) to make sure I am keeping the original request.

   

  Hmm, is there a better solution anyone knows of? 

   

  Basically I just want to do an insert into a database of some stuff from each request.

   

  Josh

   


------------------------------------------------------------------------------

  From: David H [mailto:bluepaul at earthlink.net] 
  Sent: Wednesday, 19 July 2006 11:27 AM
  To: Joshua Burvill
  Cc: zope at zope.org
  Subject: Re: [Zope] Script execute with every request

   

  Joshua Burvill wrote: 

  Hi,

   

  I’d like to log certain parts of each request into a database table for every request to provide an audit trail.

   

  I thought of inserting a <dtml-call  xxx> into the standard_html_header, but when there is a RESPONSE.redirect, it will not be the original request that gets logged.

   

  Can anyone offer any suggestions?

   

  Thanks, Josh

   

  Dieter wrote this 

  http://www.dieter.handshake.de/pyprojects/zope/emulateRedirect.py

  Maybe that helps. 



  --
  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.1.394 / Virus Database: 268.10.1/391 - Release Date: 18/07/2006




  --
  No virus found in this outgoing message.
  Checked by AVG Free Edition.
  Version: 7.1.394 / Virus Database: 268.10.3/395 - Release Date: 21/07/2006




------------------------------------------------------------------------------


  _______________________________________________
  Zope maillist  -  Zope at zope.org
  http://mail.zope.org/mailman/listinfo/zope
  **   No cross posts or HTML encoding!  **
  (Related lists - 
   http://mail.zope.org/mailman/listinfo/zope-announce
   http://mail.zope.org/mailman/listinfo/zope-dev )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20060724/845a9ea5/attachment.htm


More information about the Zope mailing list