Search code examples
pythondjangoadministration

Django simulate user connected through command line


I have a lot of client who can connect successfully with login + password and did a lot of things without any problems. But I have 5 clients who managed to do strange things and now they have some problems when they go to some URLs.

Of course I dont have their password (and I dont want them). So I need a way to login like if I were them, five times, to see what's happening with their account. I may have to do this again many times in the future. I didn't find anything on google which could allow me via command line or whatever to login as a specific user easily.

Is there something around like this?


Solution

  • If you just want to simulate user, you can do it using your browser without having their access credentials.

    For this, you can use django-hijack

    From the repo page:

    With Django Hijack, admins can log in and work on behalf of other users without having to know their credentials.