Skip to content

Manual LogEntry create not displaying changes_text in admin #674

@alxvallejo

Description

@alxvallejo

I'm trying to manually log logins as the only access action for my log.

                LogEntry.objects.create(
                    actor=user,
                    object_id=user.id,
                    object_repr=user.username,
                    action=3,
                    changes_text=f"User Login: {person.full_name}",
                    changes=[{"login": f"User Login: {person.full_name}"}], # This doesn't work either
                    content_type_id=ContentType.objects.get_for_model(user).pk,
                )

It creates the LogEntry object but the admin doesn't display my changes text (or changes in general)

image

So how can i get the changes text to display here?

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