Improve your admin action dropdown by using option groups.
Project description
Description
Improve the usability of your admin action dropdown by using option groups and the action’s docstrings as title tags.
Installation
Install from pypi.org:
pip install django-grouped-admin-actions
Usage
Use the GroupedAdminActionsMixin in your ModelAdmin classes:
from django.contrib import admin
from grouped_admin_actions.admin import GroupedAdminActionsMixin
from .models import YourModel
@admin.register(YourModel)
class YourModelAdmin(GroupedAdminActionsMixin, admin.ModelAdmin):
actions = [
'action_one',
'action_two',
'action_three',
...
]
Setup your admin actions with meaningful docstrings and use action groups as decorator:
from grouped_admin_actions.admin import action_group
group_one = ActionGroup("Action 1")
group_two = ActionGroup("Action 2")
@group_one
def action_one(modeladmin, request, queryset):
"""This is action one in group 1."""
...
@group_one
def action_two(modeladmin, request, queryset):
"""This is action two in group 1."""
...
@group_two
def action_three(modeladmin, request, queryset):
"""This is action three in group 2."""
...
Now you get a grouped action dropdown in your dango admin changelist views with the action’s docstring as title tag of each option.
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_grouped_admin_actions-1.0.tar.gz.
File metadata
- Download URL: django_grouped_admin_actions-1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
577ec4c8a3c5ddb025bc7c4a2d32f0810ac4958d6684dc8325109eb1aa9f49bf
|
|
| MD5 |
559200df39c3e63ed9c0f3e0ae365641
|
|
| BLAKE2b-256 |
bfd01002344f13b74c76efe2f1e2d68c5cce2d410499457e1546002fd0cbe16f
|
Provenance
The following attestation bundles were made for django_grouped_admin_actions-1.0.tar.gz:
Publisher:
publish.yml on thomst/django-grouped-admin-actions
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_grouped_admin_actions-1.0.tar.gz -
Subject digest:
577ec4c8a3c5ddb025bc7c4a2d32f0810ac4958d6684dc8325109eb1aa9f49bf - Sigstore transparency entry: 868177711
- Sigstore integration time:
-
Permalink:
thomst/django-grouped-admin-actions@b656509f4dfd48104a62c53b9c2a5ad62207de02 -
Branch / Tag:
refs/tags/1.0 - Owner: https://github.com/thomst
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b656509f4dfd48104a62c53b9c2a5ad62207de02 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_grouped_admin_actions-1.0-py3-none-any.whl.
File metadata
- Download URL: django_grouped_admin_actions-1.0-py3-none-any.whl
- Upload date:
- Size: 4.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 |
dd4cc9d803d291be4e1c69af050def9ef35e248f4d6bcb989cf1fdac2c161736
|
|
| MD5 |
f6b3796d9333dce60f5fd998feb9981f
|
|
| BLAKE2b-256 |
3b8725931b49bae173448eaed4d34a75d85e8194e72efd803bf3e94e4e1eba25
|
Provenance
The following attestation bundles were made for django_grouped_admin_actions-1.0-py3-none-any.whl:
Publisher:
publish.yml on thomst/django-grouped-admin-actions
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_grouped_admin_actions-1.0-py3-none-any.whl -
Subject digest:
dd4cc9d803d291be4e1c69af050def9ef35e248f4d6bcb989cf1fdac2c161736 - Sigstore transparency entry: 868177712
- Sigstore integration time:
-
Permalink:
thomst/django-grouped-admin-actions@b656509f4dfd48104a62c53b9c2a5ad62207de02 -
Branch / Tag:
refs/tags/1.0 - Owner: https://github.com/thomst
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b656509f4dfd48104a62c53b9c2a5ad62207de02 -
Trigger Event:
push
-
Statement type: