Tables2Mixin

class djcrud.views.tables2.Tables2Mixin[source]

Bases: object

django-tables2 integration for list views.

table_template

Partial template wrapping the rendered table.

Type:

str

table_attributes

Extra attributes on the generated Table subclass.

Type:

dict

property table_fields

Column names from clone or auto-detected model fields.

property table

Rendered django-tables2 Table for the current object list.

property add_actions

Whether to add an per-row actions column.

property add_checkbox

Whether to add list-action selection checkboxes.

When true, a CheckboxColumn is inserted. Checkboxes are only emitted for rows that have at least one allowed list action (computed per-row via get_tagged_views(..., object=record)), and carry data-list-actions so the bar can filter actions client-side.

sort_url(column)[source]

URL toggling sort order for column.