Registry / web-framework / django-admin-extra-buttons

django-admin-extra-buttons

JSON →
library2.2.1pypypiunverified

Django mixin to easily add custom buttons to any ModelAdmin, change form, or changelist. Current version is 2.2, requires Python >=3.12 and Django >=4.2 (implicitly). The library is actively maintained with regular releases.

pip install django-admin-extra-buttons
INSTALL
IMPORT
SIG · DJANGO-ADMIN-EXTRA
D
django-admin-extra-buttons
web-frameworkpythonv2.2.1
Install
3.8s avg
Import
Disk
70MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.1.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 70.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.000s · 71MB
70MB installed
● package 70MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ExtraButtonsMixin
from admin_extra_buttons import ExtraButtonsMixin
from admin_extra_buttons.mixins import ExtraButtonsMixin

Add a custom button to a ModelAdmin using ExtraButtonsMixin and the button decorator.

from django.contrib import admin from admin_extra_buttons.mixins import ExtraButtonsMixin from admin_extra_buttons.decorators import button from django.http import HttpResponse class MyModelAdmin(ExtraButtonsMixin, admin.ModelAdmin): @button(label='Say Hello', permission='some_app.can_view') def say_hello(self, request): return HttpResponse('Hello!') admin.site.register(MyModel, MyModelAdmin)
Debug
Known issues
breakingVersion 2.0 dropped support for Django <3.2 and Python <3.8. If upgrading from 1.x, review changes in get_urls() method and ensure your custom views are compatible.
fix
Upgrade to Django >=3.2 and Python >=3.8. Review custom get_urls() overrides for compatibility with new URL patterns.
affects: >=2.0
gotchaThe button decorator's `permission` argument is a string, not a callable. Using a callable will cause a TypeError or be ignored.
fix
Use 'app_label.permission_codename' string format. For dynamic checks, use Django's perms in the request.
affects: all
gotchaWhen using @choice or @button on methods that also have @admin.display, the button will not render properly. Do not mix these decorators.
fix
Define button methods separately from list display methods.
affects: all
deprecatedThe `buttons` property (list of dicts) is deprecated in favor of the decorator-based approach as of v1.6. It will be removed in a future release.
fix
Refactor to use decorators (@button, @choice, @link, @view) instead of defining buttons dict.
affects: >=1.6 <3.0
Upgrade
Version history
2.2.1latest on PyPI · released May 19, 2026
Audit
Dependencies
DjangorequiredRequired Django admin integration; version >=4.2 (implied by Python 3.12+ support).
Agent activity
5 hits · last 30 days
node
4
Resources
django-admin-extra-buttons — pip install django-admin-extra-buttons · libregistry