Skip to content

Add custom model for CRUD events #297

@anuj-scanova

Description

@anuj-scanova

I want to add extra fields to the CRUD event model. My use case is that my application has a feature to invite users who can work on the account owner's data. To do that, I have a middleware that updates request.user with the account owner, in case an invited user is logged in. Also, set request._shared_user to the user who is logged in and acting.

In this case, all events are being logged with the owner user as user instance and, who has performed the event is not being logged.

Could I extend the base CRUD Event table and add a field like shared_user = models.ForeignKey(User) and then update the crud() method to add shared_user = request._shared.user

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions