Setting auto_now and auto_now_add to True will automatically set a DateField or a DateTimeField to the current date and time. This works great for "created" and "modified" fields. However, suppose you're importing content from another system, and you...
Markdown supported · ⌘↵ to post
Mark
(And don't accidentally write
created = models.DateTimeField(default=timezone.now())because then you get the server start time. Not that I ever did something like that and not notice it for weeks...)