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
Requirements
Python>=3.12,<3.15Django>=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
-
Install Django admin list charts from PyPI by using
pip:pip install django-admin-list-charts -
Add
'admin_list_charts'entry to DjangoINSTALLED_APPSsetting. -
Sprinkle some
ListChartMixinover 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'
...
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf9ad0c78dd505576de1951467e2e4ea6d4ca091e66fce797382f9d1787bc340
|
|
| MD5 |
d633d53388b933c14ee1da2cb579af2b
|
|
| BLAKE2b-256 |
a51262483f61860658ae4c19d74e51320366e8bbdc7e82d98fb88bcbca1dd625
|
File details
Details for the file django_admin_list_charts-0.2.0-py3-none-any.whl.
File metadata
- Download URL: django_admin_list_charts-0.2.0-py3-none-any.whl
- Upload date:
- Size: 76.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a971c0417ceb7dab4c3d9061853801e6e1ba3656a83a3ddf54d5bb578eb0aabe
|
|
| MD5 |
d371fb1866c8f4049cdf315734ff9577
|
|
| BLAKE2b-256 |
24dbbaa7db0a9739d9e3dab135386d2ca1063b88efcf784492ccfe33e5868949
|