Skip to main content

Wagtail integration for django-impersonate

Project description

wagtail-impersonate

Wagtail extension to allow superusers to "impersonate" other accounts.

Version: 0.1.0

Author: Stepan Pliaskin (https://plyask.in/)

Dependencies

  • Wagtail 6.1 and newer.
  • django-impersonate 1.9.4 and newer.

Installation

PIP:

pip install wagtail-impersonate

Use

  1. Add impersonate and wagtail-impersonate to your INSTALLED_APPS

  2. Add impersonate.middleware.ImpersonateMiddleware to your MIDDLEWARE setting.

  3. Add impersonate.urls somewhere in your url structure. Example:

    urlpatterns = patterns('',
        url(r'^admin/', include(admin.site.urls)),
        url(r'^impersonate/', include('impersonate.urls')),
        ... (all your other urls here) ...
    )
    

Note: The ImpersonationMiddleware class should be placed AFTER the django.contrib.auth.* middleware classes

Functionality

To to Settings -> Users. Find user to impersonate. Press dots (More options for user). Press Impersonate button.

To finish impersonation press Stop impersonation on admin sidebar.

Settings

Since this module is kind of wrap for django-impersonate you need to update settings.py according to README.md of django-impersonate

There are three lines that require attention.

IMPERSONATE = {
    "URI_EXCLUSIONS": [],
    "REDIRECT_FIELD_NAME": "next",
    "REDIRECT_URL": "/",
}

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

wagtail_impersonate-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wagtail_impersonate-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file wagtail_impersonate-0.1.0.tar.gz.

File metadata

  • Download URL: wagtail_impersonate-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for wagtail_impersonate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c188aa01c4679f61128c648166c0d13cff868b0a0e9ea4a518da1955bba25e08
MD5 cf690f6c2ceb90fe6bc94701ba121f05
BLAKE2b-256 a7ff2ec8c61a7afc1488c8f58412e874d4bd2d3cc167da58f970d8b840003440

See more details on using hashes here.

File details

Details for the file wagtail_impersonate-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wagtail_impersonate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c00bd9953ec0fa544bd98630956e7e7bdfe120c119cbde3d48571ed6dc936e13
MD5 8f94f79e6df8ce51934930934220dc0e
BLAKE2b-256 910c3acddc22a67733b2ec6c8204c2567a43136ade8d119497dcdf9d3ff952f6

See more details on using hashes here.

Supported by

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