I don't recall where, but I thought I had heard once that the auto_add
and auto_add_now options to date fields in models was going away.

I've seen 2 main options in the wild and I'm not sure which is
preferred... I suppose each has its own use case:

1) Add default=datetime.now to the field.  This seems to provide a
pre-save setting of a date that shows up in the admin and can be
changed prior to saving.  Looks like it's good for a created date
field if you're ok with the idea that you can change it in the admin.

2) Override save and set the field prior to saving.  This seems like
it's good for an 'updated' date field that automatically updates every
time it's saved.

Are those breakdowns accurate?  Is the auto_now_* stuff really going
away?  And if so, could the docs be updated to reflect that?  Are
there other ways to get 'created' and 'updated' functionality?

Thanks,
Rob

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to