diff --git a/docs/ref/contrib/admin/actions.txt b/docs/ref/contrib/admin/actions.txt index 084caca69ee8..331d52cd031c 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 f963940184e9..8d548d64398c 100644 --- a/docs/spelling_wordlist +++ b/docs/spelling_wordlist @@ -88,6 +88,7 @@ codebase codec codename codenamed +codenames coercible commenters conf diff --git a/tests/admin_views/test_related_object_lookups.py b/tests/admin_views/test_related_object_lookups.py index eeba23f4f3b0..d15625efa66f 100644 --- a/tests/admin_views/test_related_object_lookups.py +++ b/tests/admin_views/test_related_object_lookups.py @@ -1,5 +1,3 @@ -from selenium.common.exceptions import TimeoutException - from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.auth.models import User from django.test import override_settings @@ -183,6 +181,7 @@ def test_related_object_add_js_actions(self): ) def test_child_popup_not_closed_when_parent_minimized(self): + from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.by import By album_add_url = reverse("admin:admin_views_album_add")