Touching an object / updating the modification time
Is it possible to update the modification time of an object (in this case an Image object)? (I need to do this from a python script) Thanks, Jakob
-----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). - -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknMzCIACgkQCJIWIbr9KYzEFQCfYrrEmUNzxKorC5UIPopH7eQo XJYAn1YM/y31UbmBFmC3Fa+KbXRviP1m =iwKW -----END PGP SIGNATURE-----
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
participants (3)
-
Andreas Jung -
Jakob Schou Jensen -
Paul Winkler