Skip to main content

django-assume

Django Assume is a simple, reusable Django app that allows administrators to log in to other user accounts without having to provide a password. This can be useful for investigating and troubleshooting problems related to specific user accounts.

This app is intended for use with Django 1.3 and later.

Suggestions and contributions are welcome. USE THIS APP AT YOUR OWN RISK!

Installation

  1. Add assume to settings.INSTALLED_APPS and make sure that the app_directories template loader is enabled in your project:

    INSTALLED_APPS = (
        # ...
        'assume',
    )
  2. Add one of the custom authentication backends in assume.backends to settings.AUTHENTICATION_BACKENDS. For example:

    AUTHENTICATION_BACKENDS = (
        'assume.backends.AssumableModelBackend',
        'django.contrib.auth.backends.ModelBackend',
    )
  3. Include assume.admin_urls in your project’s URL patterns:

    urlpatterns += patterns('',
        (r'^admin/', include('assume.admin_urls')),
    )

You should now see an “Assume” button near the top of each Change User form in admin.

Options

  • To specify the next URL to be redirected to after a user has been assumed, use the following setting:

    URL_AFTER_ASSUME = '/next/url/'

    Alternately, specify a custom URL pattern and pass a next_url parameter to the assume_user view:

    urlpatterns += patterns('',
        url(r'^admin/auth/user/(\d+)/assume/$', 'assume.views.assume_user', {
            'next_url': '/demo/'
        }, name='assume_user'),
    )
  • By default, staff members cannot be assumed. This can be changed using the following setting:

    CAN_ASSUME_STAFF = True

Metadata

Release files for django-assume 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-assume 0.2.1
File Size Uploaded Provenance
django-assume-0.2.1.tar.gz 5.5 kB Without provenance Details

Release files / django-assume-0.2.1.tar.gz

Download URL django-assume-0.2.1.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5b11f26cea6c1c07c17123a7b832d3883d3f12390bfdd37acf48522041b1b4b8
BLAKE2b-256 checksum
How to use checksums
255f2f1c6eee2fd8ce1797ca43789435ad8e584b4b87e74511dffa4fd5e13c45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-assume 0.2.1

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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page