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:

cd django-admin-changeform-actions/
pip install -e .

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.0.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.0.tar.gz.

File metadata

File hashes

Hashes for django_admin_changeform_actions-0.5.0.tar.gz
Algorithm Hash digest
SHA256 c9f07693ec5c1e8d17d066bb72ae492717c0325017b4d296d03626a0588ad46b
MD5 f74dd51c8c99049a1a96a19bac696c00
BLAKE2b-256 2cf9f99a0cb3bed0c2a0b02fe13097c6eb6619c867ef9d3e1da7f8f5db3e25a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_admin_changeform_actions-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d01a534071680a9fb588eb3fd1b0956cb5c0e7c912ad7d8c54e106f086e7dd35
MD5 38b7320d63b42418a8e5521ea0fb5d41
BLAKE2b-256 536a104b88b4df6ccacaf472baa22bc66e72ea385614fd288c65822e2c7b6fbf

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