pip install django-slick-reporting
The shape of a report
A report is a small declarative class: every attribute maps to a visible part of the output.
Watch what happens below as we change one line at a time — same SalesTransaction model throughout.
A group-by report
|
Filter form, chart, sortable table and CSV export — all generated from the class.
|
Change one line → a different report
group_by accepts any field or relation path. Swap "product" for "client":
|
Same class, new grouping — a completely different report.
|
Add two lines → a monthly time series
|
One column per month, computed per period.
|
Or pivot it → a crosstab matrix
|
Products as rows, clients as columns, totals at the intersections.
|
More shapes — list views, custom querysets, precomputed crosstabs, time-series × crosstab combinations — in the documentation.
Charts, from the same class
Declare the calculation once; switch the visualization by changing a single argument — no new query, no new template.
Any chart engine
Set chart_engine on the report (or per Chart). The same data renders through your engine of choice:
Highchartschart_engine="highcharts" |
Chart.jschart_engine="chartsjs" |
ApexChartschart_engine="apexcharts" |
![]() |
![]() |
![]() |
Any other JS charting library can be plugged in as a custom engine.
Dashboards
Compose any report into a page as a self-contained widget — chart, table, or both — with one template tag:
{% load slick_reporting_tags %}
{% get_widget_from_url url_name="product-sales" %}
{% get_widget_from_url url_name="monthly-product-sales" chart_id=1 display_table=False title="Chart only" %}
See the live dashboard example.
Ask the data — the LLM assistant
New: let your users ask questions in plain English and get an answer backed by a live report, with proofs. The assistant plans a report configuration, runs it through the same reporting engine, and answers with the numbers — you can inspect the generated report and the raw response right on the dashboard.

Works with OpenRouter (free models included), any OpenAI-compatible endpoint, or a local llama.cpp server. Docs · Try it live
Features
- Every report shape — simple aggregates, group-by, time-series, crosstab/pivot, and combinations of them.
- Charts included — Highcharts, Chart.js and ApexCharts wrappers, plus pluggable custom engines.
- Custom calculations — build reusable computation fields, chain dependencies, compute percentages and balances.
- Dashboards — drop any report onto a page as a self-contained widget with a template tag.
- Ask-the-data assistant — an optional LLM assistant answers plain-English questions with a generated report (docs).
- Model-optional — report against a Django model, a traversed relation, a raw SQL table, or precomputed/aggregated data.
- Fast & extendable — optimized queries, CSV export out of the box, and hooks for everything.
Installation
pip install django-slick-reporting
Add it to INSTALLED_APPS and you're ready:
INSTALLED_APPS = [
...,
"crispy_forms",
"crispy_bootstrap5",
"slick_reporting",
]
Quickstart
The group-by report above is a complete working example — declare the class, wire one URL, done. Prefer data without a view? The same configuration works on the low-level engine:
from slick_reporting.generator import ReportGenerator
report = ReportGenerator(
report_model=SalesTransaction,
group_by="product",
columns=["name", "__total__"],
)
report.get_report_data()
# -> [{'name': 'Product 1', '__total__': 56}, {'name': 'Product 2', '__total__': 43}, ...]
Demo site
Live at django-slick-reporting.com, or run it locally:
git clone https://github.com/ra-systems/django-slick-reporting.git
python -m venv .venv && source .venv/bin/activate
cd django-slick-reporting/demo_proj
pip install -r requirements.txt
python manage.py migrate
python manage.py create_entries # generates demo data
python manage.py runserver
To try the Ask the data assistant, put an OpenRouter key in the
OPENROUTER_API_KEY environment variable (a demo_proj/.env file works too). The demo defaults to the
free-tier model nex-agi/nex-n2.5-mini:free; switch models with the SLICK_REPORTING_LLM_MODEL
environment variable — e.g. SLICK_REPORTING_LLM_MODEL=google/gemma-4-31b-it:free python manage.py runserver.
Browse free models at openrouter.ai/models.
Documentation
Full documentation lives on Read the Docs. Build it locally with:
cd docs
pip install -r requirements.txt
sphinx-build -b html source build
Running the tests
git clone [email protected]:ra-systems/django-slick-reporting.git
cd django-slick-reporting/tests
python -m pip install -e ..
python runtests.py
# coverage:
coverage run --include=../* runtests.py && coverage html
Contributing
PRs and reviews are most welcome. We follow Django's contributing guidelines. If the project is useful to you, please consider giving it a star — it keeps the project visible and motivated.
Authors
- Ramez Ashraf — Initial work — @RamezIssac
You might also like
- Django ERP Framework — build business solutions with ease.
- Django Tabular Permissions — Django permissions in a translatable, filterable HTML table.
Filter form, chart, sortable table and CSV export — all generated from the class.
Same class, new grouping — a completely different report.
One column per month, computed per period.
Products as rows, clients as columns, totals at the intersections.


