Tres Seaver wrote:
Takahashi, Michael wrote:

I've actually tried that.  The problem I run into is that the folder in
my path contains a dash. When I call manage_delObjects on the following:

obj = context.restrictedTraverse('webcasts/courses/2005-2006/temp')

You need to get a reference to the container, and call
'manage_delObject' on it, e.g.:

  container = context.restrictedTraverse('webcasts/courses/2005-2006')

I usually just call aq_parent

   obj = context.restrictedTraverse('webcasts/courses/2005-2006/temp')
   container = obj.aq_parent

If you are deleting a list of objects in different folders you need to do a bit of tapdancing not to delete parents first. Like reverse sorting on the length of the physical path.


hilsen/regards Max M, Denmark
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to