"Log in as user" for the Django admin.
-
Add
loginasto your Python path, or install using pip:pip install django-loginas -
Add the
loginasapp to yourINSTALLED_APPS:
# settings.py
INSTALLED_APPS = (... 'loginas', ...)
- Add the loginas URL to your
urls.py:
# urls.py
urlpatterns += patterns('loginas.views',
url(r"^login/user/(?P<user_id>.+)/$", "user_login", name="loginas-user-login"),
)
And you should be good to go. Just visit the Django admin, navigate to a user and you should see the "Log in as user" button at the top right of the screen.
This software is distributed under the BSD license.