Fw: [Zope] Deleting objects
Lennart Regebro wrote:
How can I clear Zope Recycle bin?
You go to Control Panel, and then Database, aand press the purge button.
I thin kyou mean 'pack'?
I understood this.
And how I can modify manage_beforeDelete func to cancel del-operation(click on Delete button)?
You can't. Or at least, you don't want to. If you want a confirmation screen, it should appeare before the object is deleted.
You can Undo using the Undo tab in the ZMI. nt to do it programatically, it's "hard" :-(
I mean overloading manage_beforeDelete. How can I overloading function manage_beforeDelete in order to manage delete operation? For example: def manage_beforeDelete(self, item, container): if "something": #allow delete else: #reject delete Regard Serg
Serg wrote:
I mean overloading manage_beforeDelete. How can I overloading function manage_beforeDelete in order to manage delete operation? For example: def manage_beforeDelete(self, item, container): if "something": #allow delete else: #reject delete
class myClass (ObjectManager): def manage_beforeDelete(self,item,container): if self.REQUEST.get('really_delete_me'): return ObjectManager.manage_beforeDelete(self,item,container) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (2)
-
Chris Withers -
Serg