Created
July 11, 2015 19:49
-
-
Save gengue/67742fc58410ba1f5c84 to your computer and use it in GitHub Desktop.
Time Spamped 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
class TimeStampedModel(models.Model): | |
""" | |
Una clase abstracta que registra la fecha de creacion y | |
modificacion del modelo | |
""" | |
created = models.DateTimeField(auto_now_add=True, verbose_name="fecha de creacion") | |
modified = models.DateTimeField(auto_now=True, verbose_name="fecha de modificacion") | |
class Meta: | |
abstract = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment