Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
60 lines (37 sloc) 2.08 KB


Control of html tables - paging, sorting, css, checkbox column, primary-key column, help text, custom columns, model field columns, foreign key field columns etc. in templates with a beautiful declarative syntax.

If the above is not enough, Coffee Table will automatically optimize your query using select_related so that each page of the table will be rendered by a single SQL query.


CoffeeTable is at the cheeseshop:

pip install django_coffee_table


To use coffee_table in your project:

  1. Set up dependencies according to their respective documentation:
  1. Include django_coffee_table in your INSTALLED_APPS.

  2. Open your template and load up the coffee_table tags library:

    {% load coffee_table %}
  3. Basic usage:

    {% coffee_table object_list %}
  4. Advanced usage:

    {% coffee_table object_list field_accessors='name, content_type__app_label'
                                table_class='table table-condensed'
                                help_text=True %}

Please see the included test project for more help.