On Wed, 2003-12-03 at 13:10, Kate Legere wrote:
--- on submit it calls a DTML method named addEntryAction which calls a python method 'add'
You could probably just call the python method directly... but anyway.
# create the document context.manage_addProduct['OFSP'].manage_addFile(id, title="", file=description)
OK... note that here you're passing description to a constructor, you aren't creating an attribute called "description".
<b tal:define="pss modules/Products/PythonScripts/standard" tal:content="python: pss.newline_to_br(item.description)">
There is no description attribute in this object. You want to *call* the object if you're looking to have it display its contents. I'm guessing the reason this appeared to work in DTML is that you still had the "description" variable in your namespace. ZPT is not quite so tolerant. I'd also be you only tested the DTML version on one upload. Had you tested on multiple uploads, you probably would have seen that all objects had the same description property. HTH, Dylan