<commit_before># django-datatable

![preview](https://dl.dropboxusercontent.com/u/94696700/example.png)

## Overview

django-datatable is a simple Django app to origanize data in tabular form
based on [datatable](http://datatables.net) and [bootstrap](http://getbootstrap.com/).

It is worth mentioning that the design of this project makes reference to [django-table2](https://github.com/bradleyayers/django-tables2)
and is mainly for the purpose of learning. I really appreciate anyone making a pull-request to improve it.


## Requirements

* Python 2.x

* jQuery 1.6+

* Bootstrap 3.0

* Django 1.5+

## Quick start

- Setup Django-datatable application in Python environment:

        $ pip install django-datatable

- Add "table" to your INSTALLED_APPS setting like this:

        INSTALLED_APPS = (
            ...,
            'table',
        )

- Define a simple model named Person:

        # example/app/models.py
        class Person(models.Model):
            name = models.CharField(max_length=100)

- Add some data so you have something to display in the table.
Now define a PersonTable class without any options in the table file.

        # example/app/tables.py
        from models import Person
        from table import Table
        from table.columns import Column

        class PersonTable(Table):
            id = Column(field='id')
            name = Column(field='name')
            class Meta:
                model = Person

   And pass a table instance to the view.

        # example/app/views.py
        from django.shortcuts import render
        from app.tables import PersonTable
<commit_msg>Add travis ci image in README file<commit_after># django-datatable

[![Build Status](https://travis-ci.org/shymonk/django-datatable.svg?branch=master)](https://travis-ci.org/shymonk/django-datatable)

![preview](https://dl.dropboxusercontent.com/u/94696700/example.png)

## Overview

django-datatable is a simple Django app to origanize data in tabular form
based on [datatable](http://datatables.net) and [bootstrap](http://getbootstrap.com/).

It is worth mentioning that the design of this project makes reference to [django-table2](https://github.com/bradleyayers/django-tables2)
and is mainly for the purpose of learning. I really appreciate anyone making a pull-request to improve it.

## Requirements

* Python 2.x

* jQuery 1.6+

* Django 1.5+

* Bootstrap 3.0

## Quick start

- Setup Django-datatable application in Python environment:

        $ pip install django-datatable

- Define a simple model named Person:

        # example/app/models.py
        class Person(models.Model):
            name = models.CharField(max_length=100)

- Add "table" to your INSTALLED_APPS setting like this:

        INSTALLED_APPS = (
            ...,
            'table',
        )

- Add some data so you have something to display in the table.
Now define a PersonTable class without any options in the table file.

        # example/app/tables.py
        from models import Person
        from table import Table
        from table.columns import Column

        class PersonTable(Table):
            id = Column(field='id')
            name = Column(field='name')
            class Meta:
                model = Person

   And pass a table instance to the view.

        # example/app/views.py
        from django.shortcuts import render
        from app.tables import PersonTable

{'fraction_non_alphanumeric': 0.08741566441771781, 'fraction_numerical': 0.011733646230566148, 'mean_word_length': 2.643162393162393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3764094', 'n_tokens_mistral': 994, 'n_tokens_neox': 933, 'n_words': 324}