{ "info": { "author": "Bradley Ayers", "author_email": "bradley.ayers@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries" ], "description": "================================================\ndjango-tables2 - An app for creating HTML tables\n================================================\n\n.. figure:: https://travis-ci.org/bradleyayers/django-tables2.png\n\ndjango-tables2 simplifies the task of turning sets of data into HTML tables. It\nhas native support for pagination and sorting. It does for HTML tables what\n``django.forms`` does for HTML forms. e.g.\n\n.. figure:: http://dl.dropbox.com/u/33499139/django-tables2/example.png\n :align: center\n :alt: An example table rendered using django-tables2\n\nIts features include:\n\n- Any iterable can be a data-source, but special support for Django querysets\n is included.\n- The builtin UI does not rely on JavaScript.\n- Support for automatic table generation based on a Django model.\n- Supports custom column functionality via subclassing.\n- Pagination.\n- Column based table sorting.\n- Template tag to enable trivial rendering to HTML.\n- Generic view mixin for use in Django 1.3.\n\nCreating a table is as simple as:\n\n.. code-block:: python\n\n import django_tables2 as tables\n\n class SimpleTable(tables.Table):\n class Meta:\n model = Simple\n\nThis would then be used in a view:\n\n.. code-block:: python\n\n def simple_list(request):\n queryset = Simple.objects.all()\n table = SimpleTable(queryset)\n return render_to_response(\"simple_list.html\", {\"table\": table},\n context_instance=RequestContext(request))\n\nAnd finally in the template::\n\n {% load django_tables2 %}\n {% render_table table %}\n\n\nThis example shows one of the simplest cases, but django-tables2 can do a lot\nmore! Check out the `documentation`__ for more details.\n\n.. __: http://django-tables2.readthedocs.org/en/latest/\n\n\nBuilding the documentation\n==========================\n\nIf you want to build the docs from within a virtualenv, and Sphinx is installed\nglobally, use::\n\n make html SPHINXBUILD=\"python $(which sphinx-build)\"\n\n\nChange log\n==========\n\n- `BoundColumn.verbose_name` now titlises only if no verbose_name was given.\n ``verbose_name`` is used verbatim.\n\nv0.15.0\n-------\n\n- Add UK, Russian, Spanish, Portuguese, and Polish translations\n- Add support for computed table ``attrs``.\n\nv0.14.0\n-------\n\n- ``querystring`` and ``seturlparam`` template tags now require the request to\n be in the context (backwards incompatible) -- #127\n- Add Travis CI support\n- Add support for Django 1.5\n- Add L10N control for columns #120 (ignored in < Django 1.3)\n- Drop Python 2.6.4 support in favour of Python 3.2 support\n- Non-queryset data ordering is different between Python 3 and 2. When\n comparing different types, their truth values are now compared before falling\n back to string representations of their type.\n\nv0.13.0\n-------\n\n- Add FileColumn.\n\nv0.12.1\n-------\n\n- When resolving an accessor, *all* exceptions are smothered into ``None``.\n\nv0.12.0\n-------\n\n- Improve performance by removing unnecessary queries\n- Simplified pagination:\n\n - ``Table.page`` is an instance attribute (no longer ``@property``)\n - Exceptions raised by paginators (e.g. ``EmptyPage``) are no longer\n smothered by ``Table.page``\n - Pagination exceptions are raised by ``Table.paginate``\n - ``RequestConfig`` can handles pagination errors silently, can be disabled\n by including ``silent=False`` in the ``paginate`` argument value\n\n- Add ``DateTimeColumn`` and ``DateColumn`` to handle formatting ``datetime``\n and timezones.\n- Add ``BooleanColumn`` to handle bool values\n- ``render_table`` can now build and render a table for a queryset, rather than\n needing to be passed a table instance\n- Table columns created automatically from a model now use specialised columns\n- ``Column.render`` is now skipped if the value is considered *empty*, the\n default value is used instead. Empty values are specified via\n ``Column.empty_values``, by default is ``(None, '')`` (backward incompatible)\n- Default values can now be specified on table instances or ``Table.Meta``\n- Accessor's now honor ``alters_data`` during resolving. Fixes issue that would\n delete all your data when a column had an accessor of ``delete``\n- Add ``default`` and ``value`` to context of ``TemplateColumn``\n- Add cardinality indication to the pagination area of a table\n- ``Attrs`` is deprecated, use ``dict`` instead\n\nv0.11.0\n-------\n\n- Add ``URLColumn`` to render URLs in a data source into hyperlinks\n- Add ``EmailColumn`` to render email addresses into hyperlinks\n- ``TemplateColumn`` can now Django's template loaders to render from a file\n\nv0.10.4\n-------\n\n- Fix more bugs on Python 2.6.4, all tests now pass.\n\nv0.10.3\n-------\n\n- Fix issues for Python 2.6.4 -- thanks Steve Sapovits & brianmay\n- Reduce Django 1.3 dependency to Table.as_html -- thanks brianmay\n\nv0.10.2\n-------\n\n- Fix MANIFEST.in to include example templates, thanks TWAC.\n- Upgrade django-attest to fix problem with tests on Django 1.3.1\n\nv0.10.1\n-------\n\n- Fixed support for Django 1.4's paginator (thanks koledennix)\n- Some juggling of internal implementation. `TableData` now supports slicing\n and returns new `TableData` instances. `BoundRows` now takes a single\n argument `data` (a `TableData` instance).\n- Add support for `get_pagination` on `SingleTableMixin`.\n- `SingleTableMixin` and `SingleTableView` are now importable directly from\n `django_tables2`.\n\nv0.10.0\n-------\n\n- Renamed `BoundColumn.order_by` to `order_by_alias` and never returns ``None``\n (**Backwards incompatible**). Templates are affected if they use something\n like:\n\n {% querystring table.prefixed_order_by_field=column.order_by.opposite|default:column.name %}\n\n Which should be rewritten as:\n\n {% querystring table.prefixed_order_by_field=column.order_by_alias.next %}\n\n- Added `next` shortcut to `OrderBy` returned from `BoundColumn.order_by_alias`\n- Added `OrderByTuple.get()`\n- Deprecated `BoundColumn.sortable`, `Column.sortable`, `Table.sortable`,\n `sortable` CSS class, `BoundColumns.itersortable`, `BoundColumns.sortable`; use `orderable` instead of\n `sortable`.\n- Added `BoundColumn.is_ordered`\n- Introduced concept of an `order by alias`, see glossary in the docs for details.\n\nv0.9.6\n------\n\n- Fix bug that caused an ordered column's th to have no HTML attributes.\n\nv0.9.5\n------\n\n- Updated example project to add colspan on footer cell so table border renders\n correctly in Webkit.\n- Fix regression that caused 'sortable' class on