hi folks ! I'ld like to make a history of latest change on a web site. To do so I fetch the latest modified object using a catalog query on ModificationDate. The problem is that I'ld like to display the modification's author, which is not a property of the object. I guess that I need to find the transaction associated with the modification to get this information but I don't know how to do that... Any idea ? -- Sylvain Thénault LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org
Sylvain Thénault wrote at 2003-4-4 11:51 +0200:
I'ld like to make a history of latest change on a web site. To do so I fetch the latest modified object using a catalog query on ModificationDate. The problem is that I'ld like to display the modification's author, which is not a property of the object. I guess that I need to find the transaction associated with the modification to get this information but I don't know how to do that...
Any idea ?
You can use the databases "history" method: <object>._p_jar.db().history(...) Look the "history" signature up in "ZODB.BaseStorage.BaseStorage". Dieter
On Saturday 05 April à 08:14, Dieter Maurer wrote:
Sylvain Thénault wrote at 2003-4-4 11:51 +0200:
I'ld like to make a history of latest change on a web site. To do so I fetch the latest modified object using a catalog query on ModificationDate. The problem is that I'ld like to display the modification's author, which is not a property of the object. I guess that I need to find the transaction associated with the modification to get this information but I don't know how to do that...
Any idea ?
You can use the databases "history" method:
<object>._p_jar.db().history(...)
Look the "history" signature up in "ZODB.BaseStorage.BaseStorage".
thanks ! a simple external method like : def history(self): return self._p_jar.db().history(self._p_oid, None) does the job. regards -- Sylvain Thénault LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org
participants (2)
-
Dieter Maurer -
Sylvain Thénault