ListActionMixin

class djmvc.views.list_action.ListActionMixin[source]

Bases: ModelMixin, FormMixin

Bulk actions from the list action bar (selected row PKs in pks).

tags

Must include 'list_action' for discovery.

Type:

list[str]

title

Action label in the list action bar.

Type:

str

icon

Bootstrap Icons name.

Type:

str

color

Bulma button colour modifier.

Type:

str

message

Confirmation text in the action modal.

Type:

str

form_class

Form class for the action. Default empty Form.

Type:

type

get_queryset()[source]

Scoped queryset from the enclosing controller.

property pks

Selected primary keys from GET or POST.

property object_list

Intersection of pks with the scoped queryset.

property invalid_pks

Count of PKs outside the scoped queryset.

get_success_url()[source]

Redirect back to the list view after the action.

get_form_class()[source]

Return form_class or Django’s base Form.