django-masquerade v0.1.6 documentation
Masquerade is a simple app to allow site administrators (IE, any user with is_staff = True) to browse the site as a different user.
It is implemented via a middleware that looks for a specific key in the user’s session – the user to masquerade as. Also included are views and templates to allow the staff user to enter a username to masquerade and turn off masquerading as well as a template tag that provides links to these views for staff users.
Note that there is one template supplied by this app, masquerade/mask_form.html, which does not inherit from any other template. I recommend you simply copy this into your own template directory and edit as needed to match your site’s look and feel.
masquerade depends on django’s SessionMiddleware and, obviously, django.contrib.auth.
The unit tests depend on the mock library.
The masquerade template tag library provides the following tags:
Note: These template tags require that the request object be in the template context, so use RequestContext to render the template and make sure the django.core.context_processors.request context processor is used.
The following settings can be set in your project’s settings file.
masquerade.signals defines two signals that can be attached to: