On 4/6/07, Henrik Lied <[EMAIL PROTECTED]> wrote:
> Is this removed without a substitute?
* auto_now_add is best done by overriding 'save' to fill in the date
* auto_now can easily be handled by a callable default value that
fills in datetime.datetime.now or datetime.date.today.
* LazyDate is be
Yeah, you're right about that. Your example works best with
editable=False, I'd say.
--~--~-~--~~~---~--~~
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@googlegrou
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 = date
> 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?
--~--~-~--~~~---~--~~
Y
Hi all,
For a long time, we've recommended that people use the Django
development version instead of the latest Django release, as we try
hard to keep the development version stable. We're loosening that
policy, temporarily, for the immediate future, in order to make a
number of backwards-incompa
5 matches
Mail list logo