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/)
[](https://travis-ci.org/arteria/django-hijack-admin)
[](https://coveralls.io/github/arteria/django-hijack-admin?branch=master)

## 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 import HijackUserAdminMixin
class MyUserAdmin(UserAdmin, HijackUserAdminMixin):
list_display = (
...
'hijack_field', # Hijack button
)
```
Django admin integration for Django Hijack (https://github.com/arteria/django-hijack/)
[](https://travis-ci.org/arteria/django-hijack-admin)
[](https://coveralls.io/github/arteria/django-hijack-admin?branch=master)

## 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 import HijackUserAdminMixin
class MyUserAdmin(UserAdmin, HijackUserAdminMixin):
list_display = (
...
'hijack_field', # Hijack button
)
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-hijack-admin-2.1.0.tar.gz.
File metadata
- Download URL: django-hijack-admin-2.1.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
baaf3673b83f816173939ed13dd37297cb24aea327d253be9c20820b107d6cfb
|
|
| MD5 |
aaea625fcfa48716cb72e4ed723abf4d
|
|
| BLAKE2b-256 |
6cbe00569e767c87af4a6575b83b9406e69b5775cf4cd118c2156d75f91d53d4
|