MCPcopy
hub / github.com/django/django / _get_actions_with_action_location

Method _get_actions_with_action_location

django/contrib/admin/options.py:1126–1143  ·  view source on GitHub ↗
(
        self, request, action_location=ActionLocation.CHANGE_LIST
    )

Source from the content-addressed store, hash-verified

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 """

Callers 5

get_action_choicesMethod · 0.95
response_actionMethod · 0.95
_changeform_viewMethod · 0.95
changelist_viewMethod · 0.95

Calls 3

get_actionsMethod · 0.95
get_func_argsFunction · 0.90
django_file_prefixesFunction · 0.90

Tested by

no test coverage detected