conjunto.tables

conjunto.tables.ActionButtonType

Bases: IntegerChoices

Action buttons type, and their weights.

conjunto.tables.ActionButtonsTable

Bases: UpdateTableMixin, Table

A table mixin that provides an "actions" column for row actions.

The table will update itself if a given event is triggered. Per default, the actions column is positioned at the end via Meta.sequence. However, if you use your own Meta.sequence, don't forget to add the "actions" column at the end.

Parameters:
  • record_view_name (str, default: None ) –

    View name for the model of the record, like <app_name>:<model_name>. This is used to determine the action URLs for the action buttons, and to create the listen events for the table.

  • standard_buttons (list[ActionButtonType], default: None ) –

    List of standard action buttons to render. Change this if you e.g. want to use a DELETE_WITH_CONFIRM button instead of a DELETE button.

  • action_buttons_menu (list, default: None ) –

    Menu name for IActionButtons that should be rendered additionally to the standard buttons.

render_actions(record)

sort all desired buttons (standard and IActionMenu generated) by weight, and render them.

conjunto.tables.UpdateTableMixin

A table mixin that that updates itself using HTMX when a javascript event is triggered.

Arguments in Meta class