models
TimeStampMixin
Bases: Model
This class is a mixin that adds created_at and updated_at fields to any model that inherits from it.
Source code in backend/shared/models.py
4 5 6 7 8 9 10 11 12 13 14 |
|
created_at = models.DateTimeField(auto_now_add=True, editable=False)
class-attribute
instance-attribute
The date and time when the object was created.
updated_at = models.DateTimeField(auto_now=True)
class-attribute
instance-attribute
The date and time when the object was last updated.