简体   繁体   中英

Django Admin 'login as' button

On user form view, add button "Login As", that button will execute functionality that we login as that user. Only admins can see/execute this functionality. This is my question, how this to make?

Can someone help me with this task

There are a few Django Python packages available for this; the one I've had success with is django-hijack :

https://django-hijack.readthedocs.io/en/latest/

The interface components are very well thought out, and it contains functionality allowing you to release and return back to the admin user you were originally logged in as.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM