[Zope] manage_add with results

Paul Zwarts paz@oratrix.com
Fri, 27 Jul 2001 11:59:46 +0200


Hi again Phil,

Sorry, I feel like a boob having to email you again. I'm a bit stuck
again... I understand mostly how acquisition works, and this is a bit
difficult. I get a NameError from the dtml-method I want to output into a
new manage_addDocument.

What happens is I traverse to the directory where i want to PLACE the
method. Then the method to output is called with a name_error of db_methods
(which is a directory containing ZSQL methods to run)

I understand that being in the directory I want to place is below
db_methods, so I use a:

<dtml-with "PARENTS[0].db_methods">
  blah
</dtml-with>

I've used this many times and understand it works, but now I get the same
NameError about PARENTS.

I hope this isnt a burdening quesiton, it probably requires code reviewing,
but I just dont understand how Zope cannot understand a call to its root
level....


Thanks again if you have an idea,
Paz
-----Original Message-----
From: Phil Harris [mailto:phil.harris@zope.co.uk]
Sent: Friday, July 27, 2001 11:24 AM
To: Paul Zwarts
Cc: Zope
Subject: Re: [Zope] manage_add with results


You probably need to call it like so then:

manage_addDocument(id=something, file=spiral(_.None,_,any,other,parameters),
...)


----- Original Message -----
From: "Paul Zwarts" <paz@www2.oratrix.NL>
To: "Phil Harris" <phil.harris@zope.co.uk>
Cc: "Zope" <zope@zope.org>
Sent: Friday, July 27, 2001 10:14 AM
Subject: RE: [Zope] manage_add with results


> Morning Phil,
>
> Thanks for the quick repsonse. I am trying to create Temp directories per
> _ZSession. Using a DTML MEthod, I:
>
> 1) Create folder with name of _ZSEssion variable
> 2) Try to create a DTML method (or file) in that directory using the
> resulting output from another DTML method.
>
>
> It all works except that the newly created method is basically a copy of
the
> one I want to run.....
>
>
> Thanks,
> Paz
>
> -----Original Message-----
> From: Phil Harris [mailto:phil.harris@zope.co.uk]
> Sent: Friday, July 27, 2001 11:11 AM
> To: Paul Zwarts; Zope
> Subject: Re: [Zope] manage_add with results
>
>
> Where is this call being made, i.e. External Method, Script(Python) or
some
> DTML call?
>
>
> ----- Original Message -----
> From: "Paul Zwarts" <paz@www2.oratrix.NL>
> To: "Zope" <zope@zope.org>
> Sent: Friday, July 27, 2001 10:00 AM
> Subject: [Zope] manage_add with results
>
>
> > Greetings all,
> >
> > I'm searching around and I'm trying to locate a hint as to how I can
use:
> >
> > manage_addDocument(id=something, file=spiral, ...)
> >
> > where Spiral is the results of a method. I can get the contents of the
> > method (dtml code) into the new file, but I want the resulting text that
> the
> > method would generate. Can someone steer me in the right direction
please?
> >
> > Thanks,
> > Paz
> >
> >
> > _______________________________________________
> > 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 )
>