Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Django authentication backend allowing admins to login as another user

Project Description


Django Act As Auth Backend

Django authentication backend that allows one to login as someone else (an existing Django user allowed to login) without having to know their password.

Great for customer support and testing scenarios!


Install djactasauth:

pip install djactasauth

Add it to your auth backends in settings:

import djactasauth

Configure the custom login view to take advantage of all the features in your

from django.conf.urls import patterns, url
from djactasauth.views import act_as_login_view
from testapp.views import whoami

urlpatterns = patterns(
    url(r'^login/$', act_as_login_view, {}, 'login'),

Then you can log in with username your_superuser_name/customer and password yourpassword.


As an open source project, we welcome contributions.

The code lives on github.

Reporting issues/improvements

Please open an issue on github or provide a pull request whether for code or for the documentation.

For non-trivial changes, we kindly ask you to open an issue, as it might be rejected. However, if the diff of a pull request better illustrates the point, feel free to make it a pull request anyway.

Pull Requests

  • for code changes
    • it must have tests covering the change. You might be asked to cover missing scenarios
    • the latest flake8 will be run and shouldn’t produce any warning
    • if the change is significant enough, documentation has to be provided
  • if you are not there already, add yourself to the Authors file

Setting up all Python versions

sudo apt-get -y install software-properties-common
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
for version in 3.2 3.3 3.5 3.6; do
  sudo apt-get -y install ${py} ${py}-dev

Code of Conduct

As it is a Django extension, it follows Django’s own Code of Conduct. As there is no mailing list yet, please just email one of the main authors (see file)

Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
djactasauth-0.2.1-py2.py3-none-any.whl (5.4 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel May 22, 2017
djactasauth-0.2.1.tar.gz (5.5 kB) Copy SHA256 Checksum SHA256 Source May 22, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting