Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TimedModel(models.Model):
- """
- Model with created field
- """
- class Meta:
- abstract = True
- class Admin:
- pass
- created_at = models.DateTimeField(auto_now_add=True)
- class TimedModelUp(models.Model):
- """
- Model with updated at field
- """
- class Meta:
- abstract = True
- updated_at = models.DateTimeField(auto_now=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement