flask.ext.admin.actions
¶
-
action
(name, text, confirmation=None)[source]¶ Use this decorator to expose actions that span more than one entity (model, file, etc)
Parameters: - 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