Skip to content

How to get foreign object name #634

Open
@Tom5421

Description

@Tom5421

Hi,

I have implemented the Audit Log on one of my Django projects, I'm currently stuck at trying to get the foreign objects name for a audit log of user groups.

A user can be in either Group A, Group B or Group C. They can only be in 1 group at a time and this is just a foreign key field on my user model. I would like to retrieve the group name as the ID by its self is not very user friendly.

Would anyone be able to give me some guidance on how I could achieve this? This is not the only field that will change on the user model, as I will also be tracking email changes and a few more fields.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions