Skip to main content

Django admin integration for Django Hijack (https://github.com/arteria/django-hijack/)

Project description

# django-hijack-admin

Django admin integration for Django Hijack (https://github.com/arteria/django-hijack/)

[![Build Status](https://travis-ci.org/arteria/django-hijack-admin.svg?branch=master)](https://travis-ci.org/arteria/django-hijack-admin)
[![Coverage Status](https://coveralls.io/repos/arteria/django-hijack-admin/badge.svg?branch=master&service=github)](https://coveralls.io/github/arteria/django-hijack-admin?branch=master)

![Screenshot of django-hijack in action on the admin site.](docs/admin-screenshot.png)


## Installation

Follow the instructions on http://django-hijack.readthedocs.org/en/stable/#installation to install django-hijack.

Get the latest stable release from PyPi:

pip install django-hijack-admin

In your ``settings.py``, add ``hijack_admin`` to your installed apps:

```python
INSTALLED_APPS = (
...,
'hijack_admin',
)
```

For the admin integration to work, you must explicitly set `HIJACK_ALLOW_GET_REQUESTS = True` in your project settings.
Please be aware that users can now be hijacked not only using POST requests, but also using GET requests, which could facilitate CSRF attacks.

## Configuration

### `HIJACK_BUTTON_TEMPLATE`
Path to the template for the "Hijack" buttons. Default: `'hijack_admin/admin_button.html'`

### `HIJACK_REGISTER_ADMIN`
Whether the user model should be registered with `HijackUserAdmin` automatically. Default: `True`

## Custom user admins
Custom user admins are supported. Just set `HIJACK_REGISTER_ADMIN = False` and
modify your custom admin class as shown in this example:

```python
# admin.py
from hijack_admin.admin import HijackUserAdminMixin

class MyUserAdmin(UserAdmin, HijackUserAdminMixin):
list_display = (
...
'hijack_field', # Hijack button
)
```

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-hijack-admin-2.1.1.tar.gz (9.8 kB view details)

Uploaded Source

File details

Details for the file django-hijack-admin-2.1.1.tar.gz.

File metadata

File hashes

Hashes for django-hijack-admin-2.1.1.tar.gz
Algorithm Hash digest
SHA256 145e377caca11d8c24ec4be9f4fc5754486b3cac429bceff72198aeba43daaf4
MD5 519ed499c372022add7983b8c5221bc3
BLAKE2b-256 fc850d6bc14a545b8d4324a90532f8e18f1a102259b156b536f52aa3ebb9b031

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