TODO
Project description
Description
Django-generic-admin-actions are admin actions without an item selection. They work exactly like original admin actions but without taking a queryset. This is useful for actions that are model (and not object) related or that should manipulate model objects as a whole.
Installation
Install from pypi.org:
pip install django-generic-admin-actions
Getting started
Add generic_admin_actions to your installed apps:
INSTALLED_APPS = [ 'generic_admin_actions', 'django.contrib.admin', ... ]
Since we overwrite the change_list.html template the app must be listed before django’s admin-site.
Use the GenericActionsMixin for your ModelAdmin classes and add some actions:
from django.contrib import admin from generic_admin_actions import GenericActionsMixin def my_action(modeladmin, request): # Do some stuff here. class MyModelAdmin(GenericActionsMixin, admin.ModelAdmin): ... generic_actions = [ my_action, ... ]
Generic admin actions working all the same as original admin actions with the difference that their don’t take a queryset. So for more advanced setups like actions with intermediate pages please follow django’s official documentation.
Usage
On your model’s change-list-view choose the generic action from the dropdown and press the “Go” 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
Built Distribution
File details
Details for the file django-generic-admin-actions-0.3.tar.gz
.
File metadata
- Download URL: django-generic-admin-actions-0.3.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ead5a7137c2b26a942d1c5f3c2c66750039aec526a947c77b1b68691c55a15d |
|
MD5 | c7a9094ef9c86ede8151780a3d13c215 |
|
BLAKE2b-256 | 909c25b5afc15690aec4c19ab82fb87c1146f5ad481a5fd499116f9548b9821b |
File details
Details for the file django_generic_admin_actions-0.3-py3-none-any.whl
.
File metadata
- Download URL: django_generic_admin_actions-0.3-py3-none-any.whl
- Upload date:
- Size: 34.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd59686e6dd84d25fc60b2bcb354f0a58e5d97e77da07752a2ca9b1d9a4adc05 |
|
MD5 | aed408dd9e9d2a9d19e970f9e6e1ba71 |
|
BLAKE2b-256 | 0dea117265d9d228d76539586b1c80a77d9ebbfd4ff45eb1e05f02e316ed2dfb |