Re: Fixtures for datetime fields using auto_now

2007-07-12 Thread Russell Keith-Magee
On 6/28/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > On 6/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > I'm writing tests for an application, and I sort by update_time for > > one model. Is it possible in my fixtures to set fixed times? Right > > now, the update_time attrib

Re: Fixtures for datetime fields using auto_now

2007-06-28 Thread Russell Keith-Magee
On 6/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm writing tests for an application, and I sort by update_time for > one model. Is it possible in my fixtures to set fixed times? Right > now, the update_time attribute is always almost "right now". If I try > to set it in my JSON fi

Re: Fixtures for datetime fields using auto_now

2007-06-11 Thread [EMAIL PROTECTED]
class MyModel(models.Model): update_time = models.DateTimeField(_('Last modification time'), auto_now=True) Like that. On Jun 11, 12:47 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-06-11 at 09:27 -0700, [EMAIL PROTECTED] wrote: > > I'm writing tests for an application, and

Re: Fixtures for datetime fields using auto_now

2007-06-11 Thread Malcolm Tredinnick
On Mon, 2007-06-11 at 09:27 -0700, [EMAIL PROTECTED] wrote: > I'm writing tests for an application, and I sort by update_time for > one model. Is it possible in my fixtures to set fixed times? Right > now, the update_time attribute is always almost "right now". If I try > to set it in my JSON f

Fixtures for datetime fields using auto_now

2007-06-11 Thread [EMAIL PROTECTED]
I'm writing tests for an application, and I sort by update_time for one model. Is it possible in my fixtures to set fixed times? Right now, the update_time attribute is always almost "right now". If I try to set it in my JSON fixtures file, that value is overridden when the fixture is saved, an