Hi, --On Montag, 30. Juli 2001 09:41 +0000 greulen@freeler.nl wrote:
Hi
I have a page with downloadable files and wish to count the downloads. I found a 'precondition'-option with the File object. This presummably calls the Method or Document specified before download wil start. The precondition is: counter_download(thefile='zip')
From what I know precondition can only be the name of a method, not method with calling args.
HTH Tino Wildenhain PS: if you want to count your downloads - why not using a webanalyzer tool with your logs? Many updates in the ZODB is a bit costy anless you are using non undoable storage.
In the same folder I have specified the counter_download as a Python Script:
parameter: thefile
if thefile=='doc': context.manage_changeProperties(doc_downloads=context.getProperty ('doc_downloads')+1) if thefile=='zip': context.manage_changeProperties(zip_downloads=context.getProperty ('zip_downloads')+1) return "ok"
And the same folder also has these properties defined.
The Python Script works fine when I test it and also the downloads are ok. However, the counting does not happen ?! Any ideas ?
Regards Gijs
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )