Re: [Zope] How to create a folder in a just created folder using a python script.

2005-09-09 Thread Dieter Maurer
Martin Koekenberg wrote at 2005-9-9 17:48 +0200:
> ...
>In a python script I use teh following line to create a folder:
>
>context.manage_addProduct['OFSP'].manage_addFolder(Unique, 
>title=field_titel)
>
>Unique is a unique ID.
>
>How can I create to folder is this folder in the same script ?

You fetch the newly created object with:

newly_created_object = getattr(context, Unique)

and apply the same procedure as above for "newly_created_object"
in place of "context".


-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How to create a folder in a just created folder using a python script.

2005-09-09 Thread Peter Bengtsson
id1 = "something"
id2 = "else"
context.manage_addFolder(id1, "George Bush")
getattr(context, id1).manage_addFolder(id2, "George W. Bush")


On 9/9/05, Martin Koekenberg <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> In a python script I use teh following line to create a folder:
> 
> context.manage_addProduct['OFSP'].manage_addFolder(Unique,
> title=field_titel)
> 
> Unique is a unique ID.
> 
> How can I create to folder is this folder in the same script ?
> 
> regards,
> 
> Martin Koekenberg
> 
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
> 


-- 
Peter Bengtsson, 
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] How to create a folder in a just created folder using a python script.

2005-09-09 Thread Martin Koekenberg

Hello,

In a python script I use teh following line to create a folder:

context.manage_addProduct['OFSP'].manage_addFolder(Unique, 
title=field_titel)


Unique is a unique ID.

How can I create to folder is this folder in the same script ?

regards,

Martin Koekenberg

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )