Skip to main content

Reuse model admin changelist actions on changeform pages

Project description

django-admin-changeform-actions

Replicates the admin actions dropdown (available on a model's changelist page) on each model instance's changeform page.

Instead of targetting a selection the action will target the current model instance only.

Installation

Install the package:

pip install django-admin-changeform-actions

Modify your Django project like:

# settings.py

INSTALLED_APPS = [
  "changeform_actions",
]
# urls.py

urlpatterns = [
  path("", include("changeform_actions.urls"))
]
# admin.py

from changeform_actions import ChangeFormActionsMixin

class MyModelAdmin(ChangeFormActionsMixin, admin.ModelAdmin):
    actions = [...]

Development Setup

This project uses uv to handle python versions and dependencies.

uv sync

To do a new release, bump the version in pyproject.toml, then:

uv build
uv publish

Tests

uv run pytest

Run test matrix of different python versions VS different django versions:

uv run tox

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_admin_changeform_actions-0.5.2.tar.gz (59.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file django_admin_changeform_actions-0.5.2.tar.gz.

File metadata

File hashes

Hashes for django_admin_changeform_actions-0.5.2.tar.gz
Algorithm Hash digest
SHA256 7fbf3efef5c3caba05647b00f5e34848086b85115dba0b2526fc1a048e84c6b8
MD5 d3fff5376c4d34edbfcdf12491da49ac
BLAKE2b-256 8e1b6dc0a9eef266984fdac069259cd478266795931d7977c662a51afb9180dd

See more details on using hashes here.

File details

Details for the file django_admin_changeform_actions-0.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_admin_changeform_actions-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 944fa35359c988e5d4db1b470bfe8f260515c2c25f0c5aee5f9e7060776c9764
MD5 d479c640a47aeb1697a07ec40c5f7ca7
BLAKE2b-256 5db5ab2d47efcaa25fc2cacc9daad7c33780c08b61bf665113a56a48761088b8

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