R: R: [Zope] How to create a file from a form?

Casey Duncan c.duncan@nlada.org
Thu, 18 Oct 2001 08:48:57 -0400

On Thursday 18 October 2001 06:11 am, Paolo D'Aubert allegedly wrote:
> I tryed to use this method but doesn't works... :(
> Any other help?
> This is the code I'm using..
> And the page after the submit:
> <dtml-call "manage_addDTMLDocument(Nome,bello)">
> <dtml-call expr="Nome.manage_edit(pippo,pluto)">
> Thanx!

Remember, Nome is a string value coming from the form. You can't call 
manage_edit on a string. You can use getitem to lookup the object given its 
id string to do what you want:

<dtml-call expr="manage_addDTMLDocument(Nome,bello)">
<dtml-call expr="_.getitem(Nome).manage_edit(pippo,pluto)">

I might suggest coding this as a Python script tho, which would make it a bit 

doc = context[Nome]

The script will need Nome, bello, pippo, pluto as parameters. You'll notice 
that the syntax is nearly the same, minus all the <dtml-call > crap.

  Casey Duncan, Sr. Web Developer
  National Legal Aid and Defender Association