At least the auto_now and auto_now_add options are much better handled
by overwriting a models save method
class MyModel(models.Model):
self.created = models.DatetimeField()
self.modified = models.DatetimeField()
def save(self):
if not self.id:
self.created = datetime.datetime.now()
else:
self.modified = datetime.datetime.now()
super(MyModel, self).save()
On 4/6/07, Henrik Lied <[EMAIL PROTECTED]> wrote:
>
> > Examples of some of these changes are:
> >
> > * Removing the "auto_now" and "auto_now_add" options in Django models.
> >
> Is this removed without a substitute?
>
>
> > * Removing the LazyDate shortcut.
> >
> Again, is this removed without a substitute?
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---