Fw: [Zope] Deleting objects

Serg sutni at yandex.ru
Fri Apr 2 00:06:37 EST 2004


> > 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






More information about the Zope mailing list