Created
October 2, 2023 19:24
-
-
Save jairajsahgal/60c0039dd48d4ed24d4c72b3f55d62d3 to your computer and use it in GitHub Desktop.
time based stamp abstract model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class TimeStampedModel(models.Model): | |
created_at = models.DateTimeField(auto_now_add=True) | |
updated_at = models.DateTimeField(auto_now=True) | |
class Meta: | |
abstract = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment