Allow ModelAdmin.actions to be set to None. (#560)

`None` is an allowed value to disable all actions for a particular `ModelAdmin`.
This commit is contained in:
Simon Charette
2021-01-31 02:24:32 -05:00
committed by GitHub
parent a1334a70b9
commit 8f9e77ce39

View File

@@ -154,7 +154,7 @@ class ModelAdmin(BaseModelAdmin[_ModelT]):
delete_selected_confirmation_template: str = ... delete_selected_confirmation_template: str = ...
object_history_template: str = ... object_history_template: str = ...
popup_response_template: str = ... popup_response_template: str = ...
actions: Sequence[Union[Callable[[ModelAdmin, HttpRequest, QuerySet], None], str]] = ... actions: Optional[Sequence[Union[Callable[[ModelAdmin, HttpRequest, QuerySet], None], str]]] = ...
action_form: Any = ... action_form: Any = ...
actions_on_top: bool = ... actions_on_top: bool = ...
actions_on_bottom: bool = ... actions_on_bottom: bool = ...