Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom model for CRUD events #297

Open
anuj-scanova opened this issue Jul 23, 2024 · 0 comments
Open

Add custom model for CRUD events #297

anuj-scanova opened this issue Jul 23, 2024 · 0 comments

Comments

@anuj-scanova
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant