Skip to main content

Django tables with advanced user experience

Project description

django-tableaux

Django tables with Advanced User eXperience

Almost every Django project has a need to display data in tabular form. Creating a simple table is relatively easy, but if your data is complex with many columns you owe it to your users to present the data in a format that suits them. Different users may want to view different combinations of columns, be using very different devices and maywant to interactively work with the table in different ways. Simple html tables don't meet those requirements well. That's where this package comes in.

Django-tableaux builds upon two well-established django apps: django_tables2 and django_filter and enhances their functionality through a sprinkling of htmx magic. It provides a single class-based docs/source/TableauxView.md in which you can enable multiple features to deliver a customised user experience that embodies the best practices for interactive tables.

[!NOTE] This package is still in a beta stage but is already highly functional with few restrictions on use. The documentation is still under construction but should be sufficient to get started with the product.

Key features

  • User-definable columns selection with frozen columns and preset widths
  • Fully responsive: Define different table layouts for mobile, tablet and desktop
  • Perform bulk actions on selected rows or on all (possibly filtered) rows
  • User-definable rows per page with options for infinite scroll and infinite load-more data
  • Display filters in a toolbar, in a modal or embed them within the table header
  • Show active filter pils with ability to clear individual filters
  • Edit specific fields directly inside the table
  • Easy integration with generic views for CRUD operations
  • Configurable toolbars above and below the table data

See docs/source/introduction.md for a more detailed walkthrough of these features.

Installation

uv add django-tableaux

or

pip install django-tableaux

Dependencies

At a minimum django-tableaux requires django_tables2, django_filter and htmx to operate. If not already loaded installing django-tableaux will also install suitable versions of those packages. If you are using bootstrap and employing filtering, django-tableaux's standard templates use the https://github.com/zostera/django-bootstrap5 package to display the filter form's fields. This package is not automatically installed; you must install it separately if needed.

Templates and CSS

Django-tableaux splits table generation into a hierarchy of templates. To properly present tables a minimum amount of CSS is required. We provide a native CSS file that defines the minimum to make tables look good, and include CSS variables that you can set to tailor the colours and presentation. We also supply ready-built templates adapted for Bootstrap that work for both version 4 and version 5.

[!NOTE] In this version we only support Bootstrap 5. Other CSS option will be supported in a subsequent release.

Internally, templates are organised in a template dictionary. This dictionary is loaded with a mixture of basic templates, bootstrap-specific templates if required, and optionally user-specific templates.

See docs/source/templates.md for details on the template dictionary and how to override templates.

Documentation

Full documentation is in docs/source:

  • Introduction — overview of the features django-tableaux provides
  • TableauxView — the main class-based view
  • Views — view configuration
  • Columns — defining and customising columns
  • Attributes — view and column attributes reference
  • Settings — project-wide settings
  • Templates — the template dictionary and overriding templates
  • Toolbar — toolbar and filter placement

Project details


Download files

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

Source Distribution

django_tableaux-0.8.1.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_tableaux-0.8.1-py3-none-any.whl (73.7 kB view details)

Uploaded Python 3

File details

Details for the file django_tableaux-0.8.1.tar.gz.

File metadata

  • Download URL: django_tableaux-0.8.1.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for django_tableaux-0.8.1.tar.gz
Algorithm Hash digest
SHA256 6e72bd7d3b294e7a9746d92b26b8a16953a7ce42c7c819cef1d581dbacbcc01f
MD5 66b51dd048e8b41a3ef9e60cf649f0de
BLAKE2b-256 06a3fc82dc2c7d37f01df5e01952c314cd6e4dbd297262ed2fea741e38ef2a10

See more details on using hashes here.

File details

Details for the file django_tableaux-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: django_tableaux-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 73.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for django_tableaux-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c53beafc5ec75c37885c5612bc6db4024facebd257de244cb53a3d7d5cf8617b
MD5 1a9c91a3aa3dd7ab4416c97e24aeda04
BLAKE2b-256 48561132ea1337a0541becdb210bcd1574377b548cf0475dc2a5110ee533d9b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page