django-tables2 - An app for creating HTML tables — django-tables2 1.2.5 documentation

# django-tables2 - An app for creating HTML tables

Its features include:

- Any iterable can be a data-source, but special support for Django querysets is included.
- The builtin UI does not rely on JavaScript.
- Support for automatic table generation based on a Django model.
- Supports custom column functionality via subclassing.
- Pagination.
- Column based table sorting.
- Template tag to enable trivial rendering to HTML.
- Generic view mixin.

About the app:

- Available on pypi
- Tested with python 2.7, 3.3, 3.4, 3.5 and Django 1.8, 1.9, Travis CI
- Documentation on readthedocs.org
- Bug tracker

## Table of contents

- Getting started
  - Tutorial
  - Populating a table with data
    - List of dicts
    - Querysets
  - Performance
- Customizing the table
  - Alternative column data
    - Using `Accessors`
    - `Table.render_foo` methods
    - Subclassing `Column`
  - Alternative column ordering
    - Ordering by accessors
    - `table.order_FOO()` methods
  - Column attributes
  - Row attributes
  - Customizing headers and footers
    - Adding column headers
      - Changing class names for ordered column headers
    - Adding column footers
      - Pass `footer`-argument to the `Column` constructor.
      - Define `render_footer` on a custom column.
  - Swapping the position of columns
  - Pagination
  - Table Mixins
  - Customizing table style
    - CSS
    - Custom Template
  - Querystring fields
  - Controlling localization
  - Class Based Generic Mixins
    - A single table using `SingleTableMixin`
    - Multiple tables using `MultipleObjectMixin`
- Reference
  - Built-in columns
  - Template tags
    - render_table
    - querystring
  - API Reference
    - `Accessor` (`A`)
    - `RequestConfig`
    - `Table`
    - `Table.Meta`
    - `Column`
    - `BooleanColumn`
    - `CheckBoxColumn`
    - `DateColumn`
    - `DateTimeColumn`
    - `EmailColumn`
    - `FileColumn`
    - `LinkColumn`
    - `RelatedLinkColumn`
    - `TemplateColumn`
    - `URLColumn`
    - `SingleTableMixin`
    - `MultiTableMixin`
  - Internal APIs
    - `BoundColumns`
    - `BoundColumn`
    - `BoundRows`
    - `BoundRow`
    - `TableData`
    - `utils`
- FAQ
  - How should I fix error messages about the request context processor?
  - How to create a row counter?
  - How to add a footer containing a column total?
- Upgrading and change log
  - Change log
    - 1.2.5 (2016-07-30)
    - 1.2.4 (2016-07-28)
    - 1.2.3 (2016-07-05)
    - v1.2.2 (2016-06-04)
    - v1.2.1 (2016-05-09)
    - v1.2.0 (2016-05-02)
    - v1.1.8 (2016-05-02)
    - v1.1.7 (2016-04-26)
    - v1.1.6 (2016-04-02)
    - v1.1.4 (2016-03-22)
    - v1.1.3 (2016-03-21)
    - v1.1.2 (2016-02-16)
    - v1.1.1 (2016-01-26)
    - v1.1.0 (2016-01-19)
    - v1.0.7 (2016-01-03)
    - v1.0.6 (2015-12-29)
    - v1.0.5 (2015-12-17)
    - v1.0.4 (2015-05-09)
    - v1.0.3
    - v1.0.2
    - v1.0.1
    - v1.0.0
    - v0.16.0
    - v0.15.0
    - v0.14.0
    - v0.13.0
    - v0.12.1
    - v0.12.0
    - v0.11.0
    - v0.10.4
    - v0.10.3
    - v0.10.2
    - v0.10.1
    - v0.10.0
    - v0.9.6
    - v0.9.5
    - v0.9.4
    - v0.9.3
    - v0.9.2
    - v0.9.1
    - v0.9.0
    - v0.8.4
    - v0.8.3
    - v0.8.2
    - v0.8.1
    - v0.8.0
    - v0.7.8
  - Upgrading from django-tables Version 1
- Glossary