You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to extend LogEntry with custom fields without introducing an additional table. I think this can be be accomplished by introducing a new class AbstractBaseLogEntry, containing all of the code from LogEntry and adding:
classAbstractBaseLogEntryclassMeta:
abstract=True# Existing code from LogEntryclassLogEntry(AbstractBaseLogEntry):
pass
New fields could then be accommodated in the log as follows:
# In myapp.modelsfromauditlog.modelsimportAbstractBaseLogEntryclassCustomLogEntry(AbstractBaseLogEntry):
new_field1=models.CharField(max_length=255, blank=True, null=True)