Note that action descriptions are %-formatted.

This commit is contained in:
JD Bothma 2022-08-05 15:02:30 +02:00 committed by GitHub
parent 5f76002500
commit 0e86d50a6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -436,6 +436,11 @@ The ``action`` decorator
make_published.allowed_permissions = ['publish'] make_published.allowed_permissions = ['publish']
make_published.short_description = 'Mark selected stories as published' 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 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 can be useful to use it without arguments as a marker in your source to
identify the purpose of the function:: identify the purpose of the function::