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.2.tar.gz (41.2 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.2-py3-none-any.whl (73.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_tableaux-0.8.2.tar.gz
  • Upload date:
  • Size: 41.2 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.2.tar.gz
Algorithm Hash digest
SHA256 6eb89f6c2536e1f7f72f2db1d9e628d51116520498bfe883741ecfe37704a420
MD5 5cfb8d6394753a0787c2371c461594df
BLAKE2b-256 3262c3b9f21f345e1dfcc7645bc89b8a1022a5cf105286d5b3d3c66b97b2681d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_tableaux-0.8.2-py3-none-any.whl
  • Upload date:
  • Size: 73.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 363c4a31f82f21072848e5f7d2388ca72c09c0b9fcac115a0eb72d39ae4a8f53
MD5 1279666390939cc98dbb004b675882aa
BLAKE2b-256 adfd9750a230976f471380f7a8b737655f8840391062e592af6146ed69b683f4

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