{"id":23553,"library":"django-admin-extra-buttons","title":"django-admin-extra-buttons","description":"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.","status":"active","version":"2.2","language":"python","source_language":"en","source_url":"https://github.com/saxix/django-admin-extra-buttons","tags":["django","admin","buttons","mixins","extra-buttons","django-admin"],"install":[{"cmd":"pip install django-admin-extra-buttons","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required Django admin integration; version >=4.2 (implied by Python 3.12+ support).","package":"Django","optional":false}],"imports":[{"wrong":"from admin_extra_buttons.mixins import ExtraButtonsMixin","symbol":"ExtraButtonsMixin","correct":"from admin_extra_buttons import ExtraButtonsMixin"}],"quickstart":{"code":"from django.contrib import admin\nfrom admin_extra_buttons.mixins import ExtraButtonsMixin\nfrom admin_extra_buttons.decorators import button\nfrom django.http import HttpResponse\n\nclass MyModelAdmin(ExtraButtonsMixin, admin.ModelAdmin):\n    @button(label='Say Hello', permission='some_app.can_view')\n    def say_hello(self, request):\n        return HttpResponse('Hello!')\n\nadmin.site.register(MyModel, MyModelAdmin)","lang":"python","description":"Add a custom button to a ModelAdmin using ExtraButtonsMixin and the button decorator."},"warnings":[{"fix":"Upgrade to Django >=3.2 and Python >=3.8. Review custom get_urls() overrides for compatibility with new URL patterns.","message":"Version 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.","severity":"breaking","affected_versions":">=2.0"},{"fix":"Use 'app_label.permission_codename' string format. For dynamic checks, use Django's perms in the request.","message":"The button decorator's `permission` argument is a string, not a callable. Using a callable will cause a TypeError or be ignored.","severity":"gotcha","affected_versions":"all"},{"fix":"Define button methods separately from list display methods.","message":"When using @choice or @button on methods that also have @admin.display, the button will not render properly. Do not mix these decorators.","severity":"gotcha","affected_versions":"all"},{"fix":"Refactor to use decorators (@button, @choice, @link, @view) instead of defining buttons dict.","message":"The `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.","severity":"deprecated","affected_versions":">=1.6 <3.0"}],"env_vars":null,"search_vec":"'2.2':23 '3.12':26 '4.2':29 'activ':34 'add':10 'admin':3,40,48 'button':5,12,41,45 'chang':16 'changelist':19 'current':20 'custom':11 'django':2,6,28,39,47 'django-admin':46 'django-admin-extra-button':1 'easili':9 'extra':4,44 'extra-button':43 'form':17 'implicit':30 'librari':32 'maintain':35 'mixin':7,42 'modeladmin':15 'python':25 'regular':37 'releas':38 'requir':24 'version':21","created_at":"2026-05-01T08:08:22.868982+00:00","updated_at":"2026-05-01T08:08:22.868982+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'ExtraButtonsMixin' from 'admin_extra_buttons' (/tmp/tmpyamyb5dz/venv/lib/python3.12/site-packages/admin_extra_buttons/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.2.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/saxix/django-admin-extra-buttons","docs":"https://saxix.github.io/django-admin-extra-buttons/","changelog":null,"pypi":"https://pypi.org/project/django-admin-extra-buttons/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}