Skip to main content
Help us improve Python packaging – donate today!

Control of tables in templates sans BS.

Project Description

https://badge.fury.io/py/django_coffee_table.png https://travis-ci.org/alixedi/django_coffee_table.png?branch=master https://pypip.in/d/django_coffee_table/badge.png https://coveralls.io/repos/alixedi/django_coffee_table/badge.png?branch=master

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.

Installation

CoffeeTable is at the cheeseshop:

pip install django_coffee_table

Usage

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'
                                paginate_by='10'
                                table_class='table table-condensed'
                                checkbox_column=True
                                primary_key_column=True
                                help_text=True %}
    

Please see the included test project for more help.

History

1.0.0 (2014-05-27)

  • First stable release after gtting to 98% test coverage.

0.3.0 (2013-11-26)

  • Support for automatic queryset optimization using select_related.

0.2.2 (2013-11-26)

  • Added support for FK fields in tebles using the __ notation.

0.2.1 (2013-11-26)

  • Included tag_parser for kwarg parsing in the coffee_table tag.

0.2.0 (2013-11-26)

  • Improved documentation.

0.1.0 (2013-11-26)

  • First release on PyPI.

Release history Release notifications

This version
History Node

1.0.1

History Node

1.0.0

History Node

0.3.0

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django_coffee_table-1.0.1.tar.gz (13.4 kB) Copy SHA256 hash SHA256 Source None Aug 20, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page