From 0e86d50a6e35f2dfb919ddb977b575ef54a01f51 Mon Sep 17 00:00:00 2001 From: JD Bothma Date: Fri, 5 Aug 2022 15:02:30 +0200 Subject: [PATCH] Note that action descriptions are %-formatted. --- docs/ref/contrib/admin/actions.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/ref/contrib/admin/actions.txt b/docs/ref/contrib/admin/actions.txt index 56e8d7feae..34aa00ba1b 100644 --- a/docs/ref/contrib/admin/actions.txt +++ b/docs/ref/contrib/admin/actions.txt @@ -436,6 +436,11 @@ The ``action`` decorator make_published.allowed_permissions = ['publish'] make_published.short_description = 'Mark selected stories as published' + .. note:: + + The description string will be %-formatted. %-signs intended to be + printed as-is should be escaped with another %-sign, i.e. as %%. + Use of this decorator is not compulsory to make an action function, but it can be useful to use it without arguments as a marker in your source to identify the purpose of the function::