Skip to content

ViewAction ​

Overview ​

Full-page view for executing a model action. Renders a page title with a "Go Back" button and embeds a ModelActionForm for the specified app, model, and action. Accepts an optional primary key and initial form values to pre-populate the form.

Theme entry: ViewAction

Props ​

NameTypeRequiredDefaultDescription
themeOverrideObjectnullA partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants.
appstringyesDjango app label that owns the model.
modelstringyesDjango model name the action belongs to.
pkstring|number|arrayundefinedPrimary key(s) of the object(s) to act on; pass an array for multi-object actions.
actionstringyesName of the action to execute.
titlestringundefinedPage title override. The default title is the start-cased action name followed by the model's verbose name. When pk lists more than one object, the default uses the verbose plural name. The default is empty until the verbose name is known, so the layout shows a skeleton.
initialFormValuesobjectundefinedInitial field values pre-populated into the action form.

Slots ​

return-button ​

Scoped slot.

Bindings ​

NameDescription
label

default ​

Scoped slot.

Bindings ​

NameDescription
action
app
formContext
model
pk

Source ​

client/lib/views/ViewAction.vue