Skip to main content

Super simple bar charts for django admin list views visualizing the number of objects based on date_hierarchy using Chart.js.

Project description

django-admin-list-charts

Super simple bar charts for django admin list views visualizing the number of objects based on date_hierarchy using Chart.js.

This package serves as a ready-made drop-in solution with Chart.js included. This way you can super-charge your django admin with date-based bar charts in less than a minute :)

Examples

Example 1: Django admin list charts on with bright theme

Example 1: Django admin list charts on with dark theme

Requirements

  • Python>=3.12,<3.15
  • Django>=5,<7

Compatibility update

This release updates package metadata for modern supported runtimes and is intended for Django 5.x-6.x projects running on Python 3.12-3.14.

Installation

  1. Install Django admin list charts from PyPI by using pip:

    pip install django-admin-list-charts

  2. Add 'admin_list_charts' entry to Django INSTALLED_APPS setting.

  3. Sprinkle some ListChartMixin over every admin class where you want to display charts in the admin list view. For example:

    ...
    from admin_list_charts.admin import ListChartMixin
    
    @admin.register(Foo)
    class FooAdmin(ListChartMixin, admin.ModelAdmin):
	    date_hierarchy = 'created'
	    ...
  1. Done!

Acknowledgements

This rather pragmatic solution was heavily inspired by the work of Dani Hodovic (see https://findwork.dev/blog/adding-charts-to-django-admin/).

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_admin_list_charts-0.2.0.tar.gz (76.7 kB view details)

Uploaded Source

Built Distribution

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

django_admin_list_charts-0.2.0-py3-none-any.whl (76.2 kB view details)

Uploaded Python 3

File details

Details for the file django_admin_list_charts-0.2.0.tar.gz.

File metadata

  • Download URL: django_admin_list_charts-0.2.0.tar.gz
  • Upload date:
  • Size: 76.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for django_admin_list_charts-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cf9ad0c78dd505576de1951467e2e4ea6d4ca091e66fce797382f9d1787bc340
MD5 d633d53388b933c14ee1da2cb579af2b
BLAKE2b-256 a51262483f61860658ae4c19d74e51320366e8bbdc7e82d98fb88bcbca1dd625

See more details on using hashes here.

File details

Details for the file django_admin_list_charts-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_admin_list_charts-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a971c0417ceb7dab4c3d9061853801e6e1ba3656a83a3ddf54d5bb578eb0aabe
MD5 d371fb1866c8f4049cdf315734ff9577
BLAKE2b-256 24dbbaa7db0a9739d9e3dab135386d2ca1063b88efcf784492ccfe33e5868949

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