ClairBerlin/managair

2/5 = 0.4 Add base model to include creation and modification dates.

Opened this issue · 0 comments

class BaseModel(models.Model):
    """
    I hear RoR has this by default, who doesn't need these two fields!
    """
    created_at = models.DateTimeField(auto_now_add=True)
    modified_at = models.DateTimeField(auto_now=True)

    class Meta:
        abstract = True