فهرست منبع

Doc'd that action descriptions are %-formatted.

Co-authored-by: JD Bothma <jbothma@gmail.com>
Mariusz Felisiak 2 سال پیش
والد
کامیت
cc67344db9
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      docs/ref/contrib/admin/actions.txt

+ 5 - 0
docs/ref/contrib/admin/actions.txt

@@ -466,3 +466,8 @@ The ``action`` decorator
             queryset.update(is_active=False)
 
     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`.