0

So in our project we are already using auditlog library for auditing in silo project. A new requirement has came up where i have store audit of some tables in a different table than created by this library. I am not able to do so. I have tried multiple things but still stuck on this

I tried making a Logentry which inherits Logentry and tried to register it but its not working. code:

class ModelLogEntry(LogEntry):
    # objects = LogEntryManager()
    mymodel = models.ForeignKey(Followers, on_delete=models.CASCADE)
    class Meta(object):
        db_table = 'myapp_mymodellogentry'

# f = Followers()
auditlog.register(Followers,ModelLogEntry)

In this code, I want to audit every update, create or delete functionality for followers table and that audit will be stored in myapp_mymodellogentry table but register only accepts one model.

How can I do this?

Robert
  • 7,394
  • 40
  • 45
  • 64

0 Answers0