[Zope] Touching an object / updating the modification time

Paul Winkler slinkp at gmail.com
Fri Mar 27 10:14:48 EDT 2009


On Fri, Mar 27, 2009 at 07:53:33AM -0500, Andreas Jung wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 27.03.2009 7:40 Uhr, Jakob Schou Jensen wrote:
> > Is it possible to update the modification time of an object (in this
> > case an Image object)?
> > 
> > 
> 
> The modification date is stored as 'bobobase_modification_date'
> attribute (DateTime instance).

Note though that you can't set it to an arbitrary value, because the
ZODB will set it to the current time when the transaction commits.

If that's all you want, it's sufficient to do something like:

some_image._p_changed = 1

(and then, if you're running in eg. a zopectl debug prompt, import
transaction; transaction.commit())

-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope mailing list