From d24160ab4855f6971aa1f437720adca6330048a2 Mon Sep 17 00:00:00 2001 From: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Date: Wed, 22 Apr 2026 08:04:30 +0200 Subject: Refs #12090 -- Documented parameters for contrib.admin.decorators.action(). --- docs/ref/contrib/admin/actions.txt | 22 ++++++++++++++++++---- docs/spelling_wordlist | 1 + 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/ref/contrib/admin/actions.txt b/docs/ref/contrib/admin/actions.txt index 084caca69e..331d52cd03 100644 --- a/docs/ref/contrib/admin/actions.txt +++ b/docs/ref/contrib/admin/actions.txt @@ -467,7 +467,21 @@ The ``action`` decorator In this case it will add no attributes to the function. - Action descriptions are %-formatted and may contain ``'%(verbose_name)s'`` - and ``'%(verbose_name_plural)s'`` placeholders, which are replaced, - respectively, by the model's :attr:`~django.db.models.Options.verbose_name` - and :attr:`~django.db.models.Options.verbose_name_plural`. + :param permissions: A list of permission codenames that restrict the action + to users who have at least one of the defined permissions. This sets + the ``allowed_permissions`` attribute on the function. See + :ref:`admin-action-permissions` for details. + + :param description: A human-readable description of the action to be + rendered in the admin. If ``description`` is not provided, Django + renders the function's name, converting underscores to spaces and + capitalizing the first letter of the first word. This sets the + ``short_description`` attribute on the function. + + .. admonition:: Action description ``%``-formatting support + + Action descriptions support ``%``-formatting and may include + ``'%(verbose_name)s'`` and ``'%(verbose_name_plural)s'`` placeholders. + These are replaced with the model’s + :attr:`~django.db.models.Options.verbose_name` and + :attr:`~django.db.models.Options.verbose_name_plural`. diff --git a/docs/spelling_wordlist b/docs/spelling_wordlist index f963940184..8d548d6439 100644 --- a/docs/spelling_wordlist +++ b/docs/spelling_wordlist @@ -88,6 +88,7 @@ codebase codec codename codenamed +codenames coercible commenters conf -- cgit v1.3