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

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.1.tar.gz (5.9 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.1.tar.gz.

File metadata

File hashes

Hashes for django_admin_changeform_actions-0.5.1.tar.gz
Algorithm Hash digest
SHA256 5fc67e3e50138f7fe86c01cb3914ab33155c495ae3aacd26f5b97814be77b901
MD5 ab82c8dba00d9127f3684e5f4a29c024
BLAKE2b-256 f6800aa8a96fc952c19fd2ba24659dc9a8ea22f40b53c3f231259c6d2f3ba230

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_admin_changeform_actions-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98fb444b24ab024f29295e0be769543f58ebca2aa4a1bdd40a8c7b912054724e
MD5 e73b55129a01443f51e934e5b4c109ac
BLAKE2b-256 e0c524b0e73fc67dc725a411f92fe19582c2e5a75940fed907f7c27e2674334a

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