Skip to main content

A Django middleware which allows you to view the site on behalf of a user.

Project description

A simple middleware which allows a superuser to view the site on behalf of another user.

This idea originated within Disqus, and has served quite well in helping debug user problems.


Install the package:

pip install django-view-as

Add the middleware:


Register the application within INSTALLED_APPS:


Make sure the application loader is available for templates:



Load any page with an html response type, hit the tilda key (~), and you’ll see a new toolbar at the bottom of the page. Enter a username to change who you’re viewing the site as.

Configure the menu toggle key

The following configuration option could be set in your to change the default keystroke to toggle the “View as” menu. Its value is the javascript key number that will be matched in the keydown event handler.


If you need more complex behavior (such as not binding based on the superuser attribute), check out the source the middleware is designed to be extensibile.

Project details

Download files

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

Files for django-view-as, version 0.5.0
Filename, size File type Python version Upload date Hashes
Filename, size django-view-as-0.5.0.tar.gz (8.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page