[ZODB-Dev] Adding comments to transactions?

Toby Dickenson tdickenson@geminidataloggers.com
Wed, 12 Feb 2003 23:37:00 +0000


On Wednesday 12 February 2003 5:22 pm, sean.upton@uniontrib.com wrote:
> This can be useful, but the display for this in the ZMI isn't particularly
> pretty as the notes get abutted together in their display.  Perhaps people
> should write their transaction notes in STX... ;)

Yes. The notes are joined together with \n internally, so I think a 
well-placed newline_to_br in the undo and history management pages would make 
sense.

Hmm. They are actually joined with \n\n. I wonder if there is a good reason 
for having two of them.

> Kidding aside, while the subject of transaction history in Zope is at hand:
> I have an application that instantiates an out-of-process Zope.app() via a
> cron'd python script ZEO/ClientStorage, gets a folder inside a CMF site,
> and starts to populate it with new content items.  However, the
> transaction, and subsequent notes show up in the ZMI in the root folder's
> undo tab, and not that of the folder I am using.  Is there a way to make a
> transaction behave more 'placeful' in the context of Zope, so the
> transaction history appears in the "correct" place (in my case, the portal
> folder I am working on)?

Easy. Just set the first note with something that begins with the appropriate 
url. Check out ZopeUndo/Prefix.py and App/Undo.py for the details.

-- 
Toby Dickenson
http://www.geminidataloggers.com/people/tdickenson