Created
October 1, 2018 15:05
-
-
Save robhardwick/6fd98bb61fc395a4d0be72f6268ace85 to your computer and use it in GitHub Desktop.
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 | |
from django.conf import settings | |
class AuditMixin: | |
"""Standard created/modified audit fields.""" | |
created_at = models.DateTimeField(auto_now_add=True) | |
created_by = models.ForeignKey(settings.AUTH_USER_MODEL) | |
modified_at = models.DateTimeField(auto_now=True) | |
modified_by = models.ForeignKey(settings.AUTH_USER_MODEL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment