سؤال

I'm a Zope newb. I need to delete a bunch of objects from a BTreeFolder2 from say, id 1 to id 15000. When going to the admin web interface, the objects are not ordered correctly so I can't just select and delete them. The order is strictly alpha so I get:

1
10
1000
10000
10001
etc...

My guess is I will have to use zopectl -debug and issue some Python commands to select and delete those objects.

I have no idea how to do that. Can you help?

Thanks.

هل كانت مفيدة؟

المحلول

app.restrictedTraverse('/path/to/folder').manage_delObjects(list_of_ids)
transaction.commit()
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top