[Zope] Undo log

Chris McDonough chrism@zope.com
Tue, 13 Aug 2002 13:51:32 -0400


You'd need to write the code in a Python product or an external
method and it would need to do something like this:

self.delSomething()
get_transaction().note('Something deleted')
get_transaction().commit()
self.editSomething()
get_transaction().note('Something edited')
get_transaction().commit()

Note that this "breaks" Zope's underlying concept that one web
request is equal to one transaction, because the first commit will
commit anything that has happened before it.

- C

----- Original Message -----
From: "Mark Gibson" <mark@dimensional.com>
To: <zope@zope.org>
Sent: Tuesday, August 13, 2002 1:51 PM
Subject: [Zope] Undo log


> Is there any way to log specific messages, or customize the
message a
> transaction leaves in the undo log?  I have a method that does a
both
> updates and deletes an object.  I'd like to be able to show in the
undo
> log which event was executed.  For example:
>
> current undo log:
>
>
>   /path/document_edit by mark  2002-08-13 11:29:41 AM
>   /path/document_edit by mark  2002-08-13 11:29:27 AM
>
>
> want it to show something like:
>
> /path/document_edit deleted by mark 2002-08-13 11:29:41 AM
> /path/document_edit updated by mark 2002-08-13 11:29:27 AM
>
>
> Thanks,
>
> Mark
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>