Ciao Antonio, On Nov 4, 2008, at 8:58 PM, Antonio Volpon wrote: > import datetime > from django.db import models > > class Object(models.Model): > description = models.CharField(max_length=255) > insert_date = models.DateTimeField(editable=False) > update_date = models.DateTimeField(editable=False) > > def save(self): > if not self.id: > self.insert_date = datetime.date.today() > self.update_time = datetime.date.today() > super(Object, self).save()
you have a field called update_date but then you reference it as self.update_time in the save() method, maybe that’s why it isn’t working? Cheers! -- Antonio --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---