(
self, request, action_location=ActionLocation.CHANGE_LIST
)
| 1124 | |
| 1125 | # RemovedInDjango70Warning: When the deprecation ends, remove. |
| 1126 | def _get_actions_with_action_location( |
| 1127 | self, request, action_location=ActionLocation.CHANGE_LIST |
| 1128 | ): |
| 1129 | if "action_location" in get_func_args(self.get_actions): |
| 1130 | return self.get_actions(request, action_location=action_location) |
| 1131 | else: |
| 1132 | warnings.warn( |
| 1133 | "Overriding get_actions() without the 'action_location' parameter is " |
| 1134 | "deprecated. Update the signature to get_actions(self, request, " |
| 1135 | "action_location=ActionLocation.CHANGE_LIST).", |
| 1136 | RemovedInDjango70Warning, |
| 1137 | skip_file_prefixes=django_file_prefixes(), |
| 1138 | ) |
| 1139 | if action_location == ActionLocation.CHANGE_FORM: |
| 1140 | # Disable adding actions on change form when get_actions is |
| 1141 | # overridden with old signature. |
| 1142 | return {} |
| 1143 | return self.get_actions(request) |
| 1144 | |
| 1145 | def get_actions(self, request, action_location=ActionLocation.CHANGE_LIST): |
| 1146 | """ |
no test coverage detected