Skip to content

Instantly share code, notes, and snippets.

@gengue
Created July 11, 2015 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gengue/67742fc58410ba1f5c84 to your computer and use it in GitHub Desktop.
Save gengue/67742fc58410ba1f5c84 to your computer and use it in GitHub Desktop.
Time Spamped Model
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