It is common to include timestamps in your models, for the creation and modification of your model instances. In this recipe, you will learn how to create a simple model mixin that saves the creation and modification dates and times for your model. Using such a mixin will ensure that all of the models use the same field names for the timestamps, and have the same behaviors.
Creating a model mixin to handle creation and modification dates
Getting ready
If you haven't yet done so, create the utils package to save your mixins. Then, create the models.py file in the utils package.