GithubHelp home page GithubHelp logo

alixedi / django_coffee_table Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 2.0 832 KB

Control <table> in templates.

Home Page: http://alixedi.github.io/django_coffee_table

License: BSD 3-Clause "New" or "Revised" License

Python 81.52% CSS 0.01% JavaScript 0.01% Shell 18.48%

django_coffee_table's Introduction

django_coffee_table

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.