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.

Install

Install the package:

pip install django-view-as

Add the middleware:

MIDDLEWARE_CLASSES = (
        'viewas.ViewAsMiddleware',
)

Register the application within INSTALLED_APPS:

INSTALLED_APPS = (
        'django.contrib.auth',
        'django.contrib.sessions',
        'viewas',
)

Make sure the application loader is available for templates:

TEMPLATE_LOADERS = (
        'django.template.loaders.app_directories.Loader',
)

Usage

Load any page with an html response type and you’ll see a new toolbar at the top of the page. Enter a username to change who you’re viewing the site as.

Project details


Download files

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

Source Distribution

django-view-as-0.1.4.tar.gz (7.4 kB view details)

Uploaded Source

File details

Details for the file django-view-as-0.1.4.tar.gz.

File metadata

File hashes

Hashes for django-view-as-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b44eaf9e6cd159e40845d321761fe1c8813c30f618b72124c99e1286f19ade07
MD5 4fbc953e496d713b9c08a49af4eb41a4
BLAKE2b-256 abae3aecb68e8807fff96598a17b0b0a8008dbfb09e2fd3a8dba2a23e9fc0b8f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page