MCPcopy
hub / github.com/django/django / action_checkbox

Method action_checkbox

django/contrib/admin/options.py:1059–1070  ·  view source on GitHub ↗

A list_display column containing a checkbox widget.

(self, obj)

Source from the content-addressed store, hash-verified

1057 )
1058
1059 def action_checkbox(self, obj):
1060 """
1061 A list_display column containing a checkbox widget.
1062 """
1063 attrs = {
1064 "class": "action-select",
1065 "aria-label": format_html(
1066 _("Select this object for an action - {}"), str(obj)
1067 ),
1068 }
1069 checkbox = forms.CheckboxInput(attrs, lambda value: False)
1070 return checkbox.render(helpers.ACTION_CHECKBOX_NAME, str(obj.pk))
1071
1072 @staticmethod
1073 def _get_action_description(func, name):

Callers

nothing calls this directly

Calls 2

format_htmlFunction · 0.90
renderMethod · 0.45

Tested by

no test coverage detected