django-auditlog icon indicating copy to clipboard operation
django-auditlog copied to clipboard

Is it possible to add auditlog based on ManyToOneRelations?

Open jforsman opened this issue 9 months ago • 0 comments

Simple example:

class ModelA(models.Model): id = ...

class ModelB(models.Model): modela = models.ForeignKey(ModelA, related="modelbs")

I want to have auditlog change entry on a ModelA instance when ModelB is created, deleted, changed etc. with the given ModelA instance. Is this possible somehow? Did not find any ManyToOneRelation parameter (like there is one for m2m fields tracking). Did not find any test cases for this scenario so I would assume that this is not supported?

jforsman avatar May 06 '24 11:05 jforsman