Return a dictionary mapping the names of all actions for this ModelAdmin to a tuple of (callable, name, description) for each action.
(self, request, action_location=ActionLocation.CHANGE_LIST)
| 1143 | return self.get_actions(request) |
| 1144 | |
| 1145 | def get_actions(self, request, action_location=ActionLocation.CHANGE_LIST): |
| 1146 | """ |
| 1147 | Return a dictionary mapping the names of all actions for this |
| 1148 | ModelAdmin to a tuple of (callable, name, description) for each action. |
| 1149 | """ |
| 1150 | # If self.actions is set to None that means actions are disabled on |
| 1151 | # this page. |
| 1152 | if self.actions is None or IS_POPUP_VAR in request.GET: |
| 1153 | return {} |
| 1154 | base_actions = self._get_base_actions(action_location=action_location) |
| 1155 | actions = self._filter_actions_by_permissions(request, base_actions) |
| 1156 | return {action.name: action for action in actions} |
| 1157 | |
| 1158 | # RemovedInDjango70Warning: When the deprecation ends, remove. |
| 1159 | def _get_action_choices_with_action_location( |
no test coverage detected