Table ===== Base class: :doc:`Part` Describe a table. Example: .. code-block:: python class AlbumTable(Table): name = Column() artist = Column() class Meta: sortable = False .. raw:: html
▼ Hide result
Refinable members ----------------- * `action_class` Type: `Type[iommi.action.Action]` * `actions` Type: `Dict[str, iommi.action.Action]` * `actions_below`     (:ref:`evaluated `) Type: `bool` Default: `False` * `actions_template`     (:ref:`evaluated `) Type: `Union[str, iommi._web_compat.Template]` Default: `iommi/form/actions.html` * `after`     (:ref:`evaluated `) Type: `Union[int, str]` * `assets` Type: `Namespace` * `attrs`     (:ref:`evaluated `) dict of strings to string/callable of HTML attributes to apply to the table Type: :doc:`Attrs` * `auto` * `bulk`     (:ref:`evaluated `) Type: `Optional[iommi.form.Form]` * `bulk_container` Type: :doc:`Fragment` * `bulk_exclude`     (:ref:`evaluated `) exclude filters to apply to the `QuerySet` before performing the bulk operation Type: `Namespace` Default: `{}` * `bulk_filter`     (:ref:`evaluated `) filters to apply to the `QuerySet` before performing the bulk operation Type: `Namespace` Default: `{}` * `cell`     (:ref:`evaluated `) Type: `CellConfig` * `cells_class` Type: `Type[iommi.table.Cells]` * `columns` (use this only when not using the declarative style) a list of Column objects Type: `Dict[str, iommi.table.Column]` * `container`     (:ref:`evaluated `) Type: :doc:`Fragment` * `default_sort_order` * `empty_message` Type: `str` * `endpoints` Type: `Namespace` * `extra` Type: `Dict[str, Any]` * `extra_evaluated` Type: `Dict[str, Any]` * `extra_params` * `form_class` Type: `Type[iommi.form.Form]` * `h_tag`     (:ref:`evaluated `) Type: `Union[iommi.fragment.Fragment, str]` * `header` * `include`     (:ref:`evaluated `) Type: `bool` * `invalid_form_message` Type: `str` * `iommi_style` Type: `str` * `member_class` * `model`     (:ref:`evaluated `) Type: `Type[django.db.models.base.Model]` * `outer`     (:ref:`evaluated `) Type: :doc:`Fragment` * `page_class` Type: `Type[iommi.page.Page]` * `page_size`     (:ref:`evaluated `) Type: `int` Default: `16` * `parts` Type: `Namespace` * `post_bulk_edit` * `preprocess_row` * `preprocess_rows` * `query` * `query_class` Type: `Type[iommi.query.Query]` * `query_from_indexes` Type: `bool` * `row`     (:ref:`evaluated `) Type: `RowConfig` * `row_group_class` Type: `Type[iommi.table.RowGroup]` * `rows`     (:ref:`evaluated `) a list or QuerySet of objects * `sortable`     (:ref:`evaluated `) set this to `False` to turn off sorting for all columns Type: `bool` Default: `True` * `sorter` * `superheader` Type: `Namespace` * `table_tag_wrapper`     (:ref:`evaluated `) Type: :doc:`Fragment` * `tag`     (:ref:`evaluated `) Type: `str` Default: `table` * `tbody`     (:ref:`evaluated `) Type: :doc:`Fragment` * `template`     (:ref:`evaluated `) Type: `Union[str, iommi._web_compat.Template]` Default: `iommi/table/table.html` * `title`     (:ref:`evaluated `) Type: `str` Shortcuts --------- `Table.div` ^^^^^^^^^^^ Defaults ++++++++ * `tag` * `div` * `tbody__tag` * `div` * `cell__tag` * `None` * `row__tag` * `div` * `header__template` * `None` Methods ------- `as_view` ^^^^^^^^^ `bulk_queryset` ^^^^^^^^^^^^^^^ Return the queryset that contains only the selected rows with bulk_filter and bulk_exclude applied. For use in post_handlers. Only valid when rows was a queryset. `cells_for_rows` ^^^^^^^^^^^^^^^^ Yield a Cells instance for each visible row on the screen. `get_visible_rows` ^^^^^^^^^^^^^^^^^^ `on_bind` ^^^^^^^^^ `on_refine_done` ^^^^^^^^^^^^^^^^ `own_evaluate_parameters` ^^^^^^^^^^^^^^^^^^^^^^^^^ `selection` ^^^^^^^^^^^ Return the selected rows. For use in post_handlers. It's a queryset if rows is a queryset and a list otherwise. Unlike bulk_queryset neither bulk_filter nor bulk_exclude are applied. `should_render_form_tag` ^^^^^^^^^^^^^^^^^^^^^^^^ Class methods ------------- `columns_from_model` ^^^^^^^^^^^^^^^^^^^^