[Zope] precondition with File: Python Script does not work ?

greulen@freeler.nl greulen@freeler.nl
Mon, 30 Jul 2001 09:41:42 -0000


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')
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