Can you add parameters to Django custom admin actions?

前端 未结 2 1736
春和景丽
春和景丽 2021-02-05 08:43

For example (not the case, but just to illustrate) if I wanted to add an action to set a specific field in the selected items to X. Is it possible to add an action to allow X to

2条回答
  •  臣服心动
    2021-02-05 09:06

    See: Actions that Provide Intermediate Pages

    You can't do it right from the changelist page, but on your intermediate page, you could have a form that would allow the user to enter a value, and then use that value for the action.

提交回复
热议问题