Django admin actions made more generic. Easily create reusable admin actions for common tasks. Provides two usable implementations and an ABC for creating your own implementations.
Project description
django-admin-action-hero
django-admin-action-hero is a library designed to make it easier to create custom
repetitive admin actions for Django's admin interface. It provides a simple way
to create classes that encapsulate admin actions, allowing for better code reuse
and organization.
Installation
To install django-admin-action-hero, you'll use pip install django-admin-action-hero
or add django-admin-action-hero to your pyproject.toml or requirements.txt.
You don't need to add anything to your INSTALLED_APPS.
Quick example
An example of how to use django-admin-action-hero to create a simple admin action:
from django.contrib import admin
from action_hero.actions import SimpleAction
def my_admin_function(item_pk):
# Your admin action logic here
pass
class MyAdmin(admin.ModelAdmin):
actions = [
SimpleAction(
my_admin_function,
name="my_custom_action",
),
]
Your MyAdmin class now has a custom admin action called "my_custom_action"
that executes my_admin_function for each selected item. You can select the
items in the Django admin interface and run the action from the actions
dropdown.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_admin_action_hero-0.1.1.tar.gz.
File metadata
- Download URL: django_admin_action_hero-0.1.1.tar.gz
- Upload date:
- Size: 68.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cf91180179f82ec710339f59cd965822c1a6782a3c1ac5bbb3cb0867ba7028b
|
|
| MD5 |
32e9fcf6124b9feb42813ce7ed4a7df1
|
|
| BLAKE2b-256 |
4655bf6d4589921d5d07f35a8bf05b550920e1836f9b02b81534e0aa2cbc68de
|
Provenance
The following attestation bundles were made for django_admin_action_hero-0.1.1.tar.gz:
Publisher:
publish-to-pypi.yml on kennethlove/django-admin-action-hero
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_admin_action_hero-0.1.1.tar.gz -
Subject digest:
0cf91180179f82ec710339f59cd965822c1a6782a3c1ac5bbb3cb0867ba7028b - Sigstore transparency entry: 775979866
- Sigstore integration time:
-
Permalink:
kennethlove/django-admin-action-hero@9295e3bdae11d26d95ec83f8b3d4361933070a65 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/kennethlove
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@9295e3bdae11d26d95ec83f8b3d4361933070a65 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_admin_action_hero-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_admin_action_hero-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b07c2aa90c6824a0bbae54e66808eabdcc9bec266fded85f44c50accf16ef85a
|
|
| MD5 |
9f03d520d4502d1d5c935ab324aaedc6
|
|
| BLAKE2b-256 |
eaa620f13787614234aa160bb2d5162b1ee6c7ffa17570c89d5bffaaed5d20c3
|
Provenance
The following attestation bundles were made for django_admin_action_hero-0.1.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on kennethlove/django-admin-action-hero
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_admin_action_hero-0.1.1-py3-none-any.whl -
Subject digest:
b07c2aa90c6824a0bbae54e66808eabdcc9bec266fded85f44c50accf16ef85a - Sigstore transparency entry: 775979871
- Sigstore integration time:
-
Permalink:
kennethlove/django-admin-action-hero@9295e3bdae11d26d95ec83f8b3d4361933070a65 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/kennethlove
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@9295e3bdae11d26d95ec83f8b3d4361933070a65 -
Trigger Event:
push
-
Statement type: