ParTecs Weblog

Undo more than 20 transactions in Zope

February 27th, 2006

Some time ago I need to undo more that 20 transactions in one go. The zope interface displayed only 20 transactions per page. I did the unthinkable and tried to undo the transactions by opening the Zope database on the interpreter. There is a much simpler solution that skipped my mind. All one needed to do was manipulate the URL like so.

http://localhost:8080/manage_UndoForm ?first_transaction:int=20&last_transaction:int=100& PrincipiaUndoBatchSize:int=80

This might seem really obvious but it skipped my mind. And if you were still wondering how one would go about viewing the undo log of the Zope database. I have a small code snippet that will help you get started.

>>> from ZODB import FileStorage, DB
>>> storage = FileStorage.FileStorage('Data.fs')
>>> root=DB(storage).open().root()
>>> print storage.undoLog(0, 10)

1 Comment »

  1. Andrea says

    YEEEEEESSS!!!!! Thanks!, You saved my life

    April 23rd, 2009 | #

Leave a comment

:mrgreen: :neutral: :twisted: :shock: :smile: :???: :cool: :evil: :grin: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad:

RSS feed for these comments. | TrackBack URI

Feedburner RSS

Enter your email address:

Delivered by FeedBurner

Blogroll

Categories

RSS Telematics Freedom

February 2006
M T W T F S S
    Mar »
 12345
6789101112
13141516171819
20212223242526
2728  

Archive

Sky Sponsored by Web Hosting