Re: Removing auto_now and auto_now_add

2007-04-10 Thread Russell Keith-Magee
On 4/10/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 4/10/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > 2) (Jacob) Add a child class of DateTimeField that defines the > > required pre_save behaviour. > > > Solution #2 seems the cleanest to me, and it has the advantage that > docu

Re: Removing auto_now and auto_now_add

2007-04-10 Thread Todd O'Bryan
On Tue, 2007-04-10 at 10:25 -0700, Gulopine wrote: > On 4/10/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > Given that logic (which, as I said, may or may not be a correct > > recollection), I vote for Jacob's solution. In fact, it might be cleaner > > to have CreationTimestamp and ModifiedTimest

Re: Removing auto_now and auto_now_add

2007-04-10 Thread Gulopine
On 4/10/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > Given that logic (which, as I said, may or may not be a correct > recollection), I vote for Jacob's solution. In fact, it might be cleaner > to have CreationTimestamp and ModifiedTimestamp fields (both subclasses > of DateTimeField) so that it'

Re: Removing auto_now and auto_now_add

2007-04-10 Thread Jacob Kaplan-Moss
On 4/10/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > Given that logic (which, as I said, may or may not be a correct > recollection), I vote for Jacob's solution. In fact, it might be cleaner > to have CreationTimestamp and ModifiedTimestamp fields (both subclasses > of DateTimeField) so that it'

Re: Removing auto_now and auto_now_add

2007-04-10 Thread [EMAIL PROTECTED]
5) decorators for modify on save http://groups.google.com/group/django-developers/browse_thread/thread/4cd631c225cb4e52/# I am still working on the end implementation, I have many models which implement some sort of dynamic update on save given a condition. The auto_now and auto_add_now are just

Re: Removing auto_now and auto_now_add

2007-04-10 Thread Todd O'Bryan
On Tue, 2007-04-10 at 13:51 +0800, Russell Keith-Magee wrote: > However, I haven't been able to find the original discussion leading > to this decision in the archives (other than a reference in the early > discussions about model validation [1]), so I haven't been able to > establish the source

Re: Removing auto_now and auto_now_add

2007-04-10 Thread Adrian Holovaty
On 4/10/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > 1) Leave it completely up to the user to define their own auto_now equivalent. > > 2) (Jacob) Add a child class of DateTimeField that defines the > required pre_save behaviour. > > 3) (Brian Beck) Add a 'default_condition' parameter - a

Removing auto_now and auto_now_add

2007-04-09 Thread Russell Keith-Magee
Hi all, I'm trying to tie up the loose ends of the auto_now/auto_now_add discussion so that I can bang together a patch. auto_now_add can be pretty much replaced with default=datetime.now. Honza raised the issue that the two aren't completely identical because if you supply a value for the field