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 -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Andy McKay Sent: Wednesday, June 06, 2001 10:32 PM To: Andy McKay; zope@zope.org Subject: Re: [Zope] Versions whats in it Okay I know its bad to answer my own post but I just ran this as an external method, and this tells you what object is in a version without having to wander through the ZMI. Might be a useful function to include on a tab in the Version object? I'll lob it in the collector def find(self): objects = self.ZopeFind(self, search_sub=1) output = [] for url, obj in objects: v = obj.locked_in_version() if v != '' and str(v) != '0': # why do some objects have 0 as a version? output.append(v, obj.absolute_url()) output.sort() output_str = 'Version | Object' for o in output: output_str = output_str + '%s | <a href="%s/manage">%s</a><br>\n' % (o[0], o[1], o[1]) return output_str Cheers. -- Andy McKay. _______________________________________________ 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:
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 `------------------>
Sedat Yilmazer writes:
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.
You know the "History" tab? You know, it provides the function you want via a Web interface? Whenever, you have this situation, you can be sure, that: 1. you can do it programmatically, too 2. you can find out how by looking at the source of the ZMI page. I am too lazy to look for you.... Dieter
participants (3)
-
Casey Duncan -
Dieter Maurer -
Sedat Yilmazer