Skip to content

Is it possible to add auditlog based on ManyToOneRelations? #640

@jforsman

Description

@jforsman

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions