RE: [Zope] Script execute with every request
Say no more, that’s exactly what I was looking for. I just (zope 2.6.4) selected Set access Rule in the zmi and click Add, enter the name of the script I want to execute and that’s it. I knew there had to be a simple way. Thanks a lot Dieter, Josh -Original Message- From: Dieter Maurer [mailto:[EMAIL PROTECTED] Sent: Tuesday, 25 July 2006 4:01 AM To: Joshua Burvill Cc: 'David H'; zope@zope.org Subject: RE: [Zope] Script execute with every request Joshua Burvill wrote at 2006-7-24 14:01 +1000: ... Basically I just want to do an insert into a database of some stuff from each request. Sounds like work for a SiteAccess AccessRule... -- Dieter -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 24/07/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 24/07/2006 ___ Zope maillist - Zope@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 )
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:[EMAIL PROTECTED] Sent: Wednesday, 19 July 2006 11:27 AM To: Joshua Burvill Cc: zope@zope.org Subject: Re: [Zope] Script execute with every request Joshua Burvill wrote: Hi, Id 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@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 )
[Zope] Script execute with every request
Hi, Id 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 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/391 - Release Date: 18/07/2006 ___ Zope maillist - Zope@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 )
RE: [Zope] dtml-sqlvar problem with large strings?
Hello All, I tried using zope 2.7.6 with kinterbasdbda 2.0 and I got the same error I think, but more informative :) ProgrammingError: (0, 'SQL statement of 2270651 bytes is too long (max 65535 allowed). Consider using parameters to shorten the SQL code, rather than passing large values as part of the SQL string.') So I guess it is the DA that disallows the long statement. So I will Consider using parameters... as it says. Otherwise I can look at switching to mxODBC. I wonder if that would disallow such long statements as well? Thanks for the help. Josh Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module Products.PythonScripts.PythonScript, line 323, in _exec Module None, line 16, in upload_process PythonScript at /external/dr3/test/quotes/upload_process Line 16 Module Shared.DC.ZRDB.DA, line 454, in __call__ SQL instance at 04168BC0 Module Products.kInterbaseDA.db, line 226, in query Module Products.kInterbaseDA.db, line 255, in _executeSQLAndReturnResultRows Module kinterbasdb, line 1592, in execute ProgrammingError: (0, 'SQL statement of 2270651 bytes is too long (max 65535 allowed). Consider using parameters to shorten the SQL code, rather than passing large values as part of the SQL string.') -Original Message- From: Andreas Jung [mailto:[EMAIL PROTECTED] Sent: Monday, 21 November 2005 4:36 PM To: Joshua Burvill; zope@zope.org Subject: Re: [Zope] dtml-sqlvar problem with large strings? --On 21. November 2005 16:30:10 +1100 Joshua Burvill [EMAIL PROTECTED] wrote: Using zope 2.6.4 on win32 with kinterbasdbda (not sure what version), firebird 1.0 This sounds like a bug in the kinterbasedbda. Since this is DA is not used widely I would recommend to buzz the author of the DA directly. When you are on Windows you could consider switching to mxODBC in case your database supports ODBC. -aj ___ Zope maillist - Zope@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 )
RE: [Zope] Packaging a zope application
Dieter wrote: Joshua Burvill wrote at 2005-10-7 12:28 +1000: ... Currently there is a three step process: 1. install correct version of zope 2. unzip a zip file which I maintain that contains all the added libraries, products, .zexp file, and external methods into their correct paths in the zope root folder on the filesystem, then restart zope 3. Log into zope as admin and import the .zexp file into the zope root folder in the zope db We put everything we can into the filesystem (e.g. via CMFCore's Filesystem Directory View) and use CVS/SVN to manage and distribute it. Things that must be in the ZODB are created via setup scripts (maintained in CVS). Thanks Dieter, This sounds like what I am looking for. I guess that means creating a kind of product. If it is not too much to ask, can anyone point to or provide an example of a working application that is organised like this so I could look at the code? It would help a lot. Regards, Josh ___ Zope maillist - Zope@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 )
[Zope] Packaging a zope application
Hello All, I have a zope application which operates on data in an external relational database (Firebird), as well as containing lots of folders, dtml docs, scripts, zsql methods etc within the zope db I would like to get suggestions on the best way to package the whole application so that it is easy to set up from scratch. Currently there is a three step process: 1. install correct version of zope 2. unzip a zip file which I maintain that contains all the added libraries, products, .zexp file, and external methods into their correct paths in the zope root folder on the filesystem, then restart zope 3. Log into zope as admin and import the .zexp file into the zope root folder in the zope db Any suggestions of easier / better ways to do this would be much appreciated. Regards, Josh ___ Zope maillist - Zope@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 )