Reputation: 21
I need to view site from admin as another user. Now I'm just changing request.user in middleware. Is it safe or maybe there is more correct solution?
Thanks
Upvotes: 2
Views: 912
Reputation:
Django packages has a list of apps that can handle user switching for you.
Depending on your requirements, just changing it in middleware is a relatively straight forward approach that some packages like django-masquerade takes.
Upvotes: 2