action(name, text, confirmation=None)[source]

Use this decorator to expose actions that span more than one entity (model, file, etc)

  • name – Action name
  • text – Action text.
  • confirmation – Confirmation text. If not provided, action will be executed unconditionally.
class ActionsMixin[source]

Actions mixin.

In some cases, you might work with more than one “entity” (model, file, etc) in your admin view and will want to perform actions on a group of entities simultaneously.

In this case, you can add this functionality by doing this: 1. Add this mixin to your administrative view class 2. Call init_actions in your class constructor 3. Expose actions view 4. Import actions.html library and add call library macros in your template


Return a list and a dictionary of allowed actions.


Handle action request.

Parameters:return_view – Name of the view to return to after the request. If not provided, will return user to the return url in the form or the list view.

Initialize list of actions for the current administrative view.


Verify if action with name is allowed.

Parameters:name – Action name