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
Install the package:
pip install django-view-as
Add the middleware:
MIDDLEWARE_CLASSES = (
'viewas.middleware.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, 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.
Metadata
Release files for django-view-as 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-view-as-0.5.0.tar.gz | 8.2 kB | Without provenance | Details |
Release files / django-view-as-0.5.0.tar.gz
| Download URL | django-view-as-0.5.0.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9fa282a7f18a1477998c5ccb075037e5b5fa95a7e557a65a77dddf9141a5e2b
|
|
BLAKE2b-256 checksum How to use checksums |
8e038942aee2d10cb88fb1330c20b7a659ea30edfd763297fa5b0478c2be2973
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-view-as 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.