Created
April 2, 2014 14:11
-
-
Save csarcom/9934966 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 History(models.Model): | |
changed_by = models.ForeignKey('user.CustomUser', null=True, blank=True) | |
history = HistoricalRecords() | |
@property | |
def _history_user(self): | |
return self.changed_by | |
@_history_user.setter | |
def _history_user(self, value): | |
self.changed_by = value | |
class CustomUser(AbstractBaseUser, PermissionsMixin, History): | |
.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment