Django: Getting Started Transcripts
Chapter: Django ORM and Databases
Lecture: Automatic `created` and `updated` dates on the model

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Let's add two more fields to our book. These two fields both stored date timestamps.
0:11 The auto now add option says to automatically set the value of this field to the date time when the object was created.
0:20 The auto now option says to automatically set the value of this field to the date time of the last time the object was changed.
0:28 When you first create a book, these two fields will have the same value. If you edit the book, the created field will stay the same,
0:35 but the updated field will have the new timestamp of the edit.


Talk Python's Mastodon Michael Kennedy's Mastodon