Table

Base class: Part

Describe a table. Example:

class FooTable(Table):
    a = Column()
    b = Column()

    class Meta:
        sortable = False
        attrs__style = 'background: green'

Refinable members

  • action_class

    Type: Type[iommi.action.Action]

  • actions_below

    Type: bool

  • actions_template

    Type: Union[str, iommi._web_compat.Template]

  • after

    Type: Union[int, str]

  • attrs

    dict of strings to string/callable of HTML attributes to apply to the table

    Type: Attrs

  • bulk

    Type: Union[iommi.form.Form, NoneType]

  • bulk_exclude

    exclude filters to apply to the QuerySet before performing the bulk operation

    Type: Namespace

  • bulk_filter

    filters to apply to the QuerySet before performing the bulk operation

    Type: Namespace

  • cell

    Type: CellConfig

  • columns

    (use this only when not using the declarative style) a list of Column objects

  • container

    Type: Fragment

  • default_sort_order

  • endpoints

    Type: Namespace

  • extra

    Type: Dict[str, Any]

  • extra_evaluated

    Type: Dict[str, Any]

  • form_class

    Type: Type[iommi.form.Form]

  • h_tag

    Type: Fragment

  • header

  • include

    Type: bool

  • iommi_style

    Type: str

  • member_class

  • model

    Type: Type[django.db.models.base.Model]

  • outer

    Type: Fragment

  • page_class

    Type: Type[iommi.page.Page]

  • page_size

    Type: int

  • paginator

    Type: Paginator

  • post_bulk_edit

  • preprocess_row

  • preprocess_rows

  • query_class

    Type: Type[iommi.query.Query]

  • query_from_indexes

    Type: bool

  • row

    Type: RowConfig

  • rows

    a list or QuerySet of objects

  • sortable

    set this to False to turn off sorting for all columns

    Type: bool

  • superheader

    Type: Namespace

  • tag

    Type: str

  • tbody

    Type: Fragment

  • template

    Type: Union[str, iommi._web_compat.Template]

  • title

    Type: Fragment

Defaults

  • actions_below
    • False
  • actions_template
    • iommi/form/actions.html
  • bulk__title
    • Bulk change
  • cell__tag
    • td
  • container__attrs__class
    • {'iommi-table-container': True}
  • container__call_target
    • iommi.fragment.Fragment
  • container__children__text__template
    • iommi/table/table_container.html
  • container__tag
    • div
  • h_tag__call_target
    • iommi.fragment.Header
  • header__template
    • iommi/table/table_header_rows.html
  • outer__call_target
    • iommi.fragment.Fragment
  • page_size
    • 40
  • paginator__call_target
    • iommi.table.Paginator
  • row__attrs__data-pk
    • lambda row, **_: getattr(row, 'pk', None)}
  • row__tag
    • tr
  • row__template
    • None
  • sortable
    • True
  • superheader__attrs__class__superheader
    • True
  • superheader__template
    • iommi/table/header.html
  • tag
    • table
  • tbody__call_target
    • iommi.fragment.Fragment
  • tbody__tag
    • tbody
  • template
    • iommi/table/table.html

Shortcuts

div

Defaults

  • extra__buz
    • 4711
  • tag
    • div
  • tbody__tag
    • div
  • cell__tag
    • None
  • row__tag
    • div
  • header__template
    • None