RE: [Zope] All previous of a document
I mean how can I access the older versions of a given document from dtml/python something like olddoc=doc.previous_version Sedat -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Casey Duncan Sent: Friday, June 29, 2001 6:35 PM To: Sedat Yilmazer Cc: zope@zope.org Subject: Re: [Zope] All previous of a document Sedat Yilmazer wrote:
How Can I find previous versions ( versions that was overwritten) of a document? There is the undo command that can undo an action to get you back to the previous version, so the data is somehow there. Problem is How can I reach that data without performing an undo.
Sedat Yilmazer
In DTML objects try the History tab. -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------> _______________________________________________ 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 )
Sedat Yilmazer wrote:
I mean how can I access the older versions of a given document from dtml/python something like olddoc=doc.previous_version
You can use the manage_change_history method of an object to return a list of mappings describing each historical revision. With that, you can retreive a revision using the HistoricalRevisions attribute, which is like a dictionary. For example, to retreive the last revision use: revisions = obj.manage_change_history() return obj.HistoricalRevisions[revisions[0]['key']] or from dtml: <dtml-var expr="HistoricalRevisions[manage_change_history()[0]['key']]"> hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
participants (2)
-
Casey Duncan -
Sedat Yilmazer