django-slick-reporting is a free, open source business intelligence & reporting project written in Python and released under BSD-3-Clause. It has 604 GitHub stars, 50 forks and 23 open issues, and was last pushed 20 days ago. On this registry it ranks #76 of 79 tracked projects in Business Intelligence & Reporting, with 5 head-to-head comparisons available.

What is django-slick-reporting?

Django Slick Reporting is a BSD-3-Clause Python reporting engine for Django that turns ordinary ORM queries into group-by reports, time-series, crosstabs and pivot tables, and renders them as sortable tables, CSV exports and charts, for Django developers who need analytics inside an existing application rather than in a separate business intelligence tool.

What it is

Django Slick Reporting is a reusable Django application that generates reports from a data source and serves them through a class-based view. A developer declares a report as a Python class subclassing ReportView, pointing it at a model through report_model, choosing a date_field and a group_by column, and listing the values to display in columns. Each column can be a plain model field or a ComputationField built on a Django aggregate such as Sum, which makes custom totals, percentages and balances expressible as reusable fields. The library then assembles the surrounding machinery: a filter form, a sortable data table, CSV export, and optional charts.

The concrete problem it solves is the repeated work of hand-writing aggregation queries, filter forms, table templates and exporter views for every analytical screen in a Django project. It lives in the Django and Python ecosystem and replaces that per-report glue code with a single declared class. It is model-optional, so a report can run against a Django model, a traversed relation, a raw SQL table, or precomputed and aggregated data, which means reporting does not force a particular schema or a separate data warehouse.

Key capabilities

  • Report shapes cover simple aggregates, group-by reports, time-series, crosstab and pivot tables, and combinations of these.
  • Time-series reports use time_series_pattern with the values daily, weekly, monthly, yearly or custom, and lay out one column per period.
  • Charts are declared with Chart(...) and support Chart.BAR, Chart.COLUMN, Chart.PIE and other types, with options such as plot_total=True and stacked or totalled variants.
  • Chart rendering can switch engine through chart_engine set to "highcharts", "chartsjs" or "apexcharts", without changing the underlying query.
  • ComputationField.create(...) builds custom calculation fields, and those fields can carry dependencies and compute percentages and balances.
  • Reports can be embedded as self-contained dashboard widgets using a template tag.
  • CSV export is generated out of the box alongside the report's filter form and sortable table.

Who uses it and how

  • Django teams that need product-facing analytics, such as a sales report totalling value sold per product from a SalesTransaction model, mounted at a URL with ProductSales.as_view().
  • Projects that need the same aggregation shown in several forms, where one report class is reused and only the Chart(...) line changes between a bar chart and a pie chart.
  • Applications building internal dashboards, where reports are dropped onto a page as widgets rather than given standalone routes.
  • Environments with unusual data layouts, since a report can read from a model, a relation, raw SQL or precomputed data.
  • Teams on Bootstrap 5 templates, since installation lists crispy_forms and crispy_bootstrap5 alongside slick_reporting in INSTALLED_APPS.

Getting started

Install with pip install django-slick-reporting, add slick_reporting to INSTALLED_APPS together with crispy_forms and crispy_bootstrap5, then define a ReportView subclass and route it in urls.py. A hosted live demo and full documentation are linked from the project homepage.

How it compares

No comparable tools are named in the provided facts, and no list of paid products it replaces is supplied, so within this registry it stands alone.

When to use it — and when not to

It suits Django projects that want reporting inside the application and are willing to operate a Django app with its template and form dependencies. It does not suit non-Django or non-Python stacks, and it assumes comfort with the Django ORM and class-based views. The repository carries 23 open issues and the Read the Below excerpt provided is partial, so prospective adopters should read the full documentation before committing to it for a large reporting surface.

project readme (upstream, from github) — read inline

Django Slick Reporting

The one-stop reporting engine for Django — analytics, charts & dashboards in a few lines of code.

PyPI version Python versions Docs Coverage License

Grouped totals, time-series, crosstabs and pivots — each one a small Python class, each one chartable with a single line, in Highcharts, Chart.js or ApexCharts.

Live Demo · Documentation · Quickstart

Django Slick Reporting dashboard

One report class, every chart

Declare the calculation once. Switch the visualization by changing a single argument — no new query, no new template.

Switching chart types by changing one argument

Why Django Slick Reporting?

  • Every report shape — simple aggregates, group-by, time-series, crosstab/pivot, and combinations of them.
  • Charts included — Highcharts, Chart.js and ApexCharts wrappers. Bar, column, line, area, pie — stacked or totalled — from one Chart(...) line.
  • 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.
  • 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

Given a typical SalesTransaction model, here is a group-by report — total value sold per product — with a bar chart:

# views.py
from django.db.models import Sum
from slick_reporting.views import ReportView, Chart
from slick_reporting.fields import ComputationField
from .models import SalesTransaction


class ProductSales(ReportView):
    report_model = SalesTransaction
    date_field = "date"
    group_by = "product"

    columns = [
        "name",
        ComputationField.create(
            Sum, "value", name="value__sum",
            verbose_name="Total sold $",
        ),
    ]

    chart_settings = [
        Chart(
            "Total sold $",
            Chart.BAR,
            data_source=["value__sum"],
            title_source=["name"],
        ),
    ]
# urls.py
path("product-sales/", ProductSales.as_view()),
Group-by bar chart result

That's the whole report — filter form, chart, sortable data table and CSV export are generated for you.

Same data, any visualization

The chart is just configuration. Keep the report, change the Chart(...) line:

Chart(
    "Sales",
    Chart.BAR,
    data_source=["value__sum"],
    title_source=["name"],
)
Bar chart
Chart(
    "Sales",
    Chart.PIE,
    data_source=["value__sum"],
    title_source=["name"],
    plot_total=True,
)
Pie chart

…and any chart engine

Set chart_engine on the report (or per Chart). The same data renders through your engine of choice:

Highcharts
chart_engine="highcharts"
Chart.js
chart_engine="chartsjs"
ApexCharts
chart_engine="apexcharts"
Highcharts Chart.js ApexCharts

Report types

Time series — one column per period (daily / weekly / monthly / yearly / custom)
class MonthlyProductSales(ReportView):
    report_model = SalesTransaction
    date_field = "date"
    group_by = "product"
    columns = ["name", "sku"]

    time_series_pattern = "monthly"          # daily / weekly / yearly / custom
    time_series_columns = [
        ComputationField.create(Sum, "value", name="value", verbose_name="Sales"),
    ]

    chart_settings = [
        Chart("Sales Monthly", Chart.COLUMN, data_source=["value"], title_source=["name"]),
    ]

Calculations are performed for each period and laid out as repeating columns, with an optional grand-total column.

Crosstab / Pivot — matrix reports with rows, columns and intersecting totals
class ClientProductMatrix(ReportView):
    report_model = SalesTransaction
    group_by = "client"
    crosstab_field = "product"
    crosstab_columns = [
        ComputationField.create(Sum, "value", verbose_name="Value"),
    ]
    crosstab_compute_remainder = True         # a column capturing "everything else"

    columns = [
        "name",
        "__crosstab__",                       # where the matrix columns land
        ComputationField.create(Sum, "value", verbose_name="Total Value"),
    ]
Crosstab matrix report

Crosstab and time-series can even be combined for a matrix over periods. Already-aggregated data? Set crosstab_precomputed=True.

List view — ungrouped, row-level data
from slick_reporting.views import ListReportView

class LastTenSales(ListReportView):
    report_model = SalesTransaction
    date_field = "date"
    columns = ["product__name", "client__name", "date", "quantity", "value"]
    default_order_by = "-date"
    limit_records = 10
Low-level engine — get raw data without a view
from slick_reporting.generator import ReportGenerator

report = ReportGenerator(
    report_model=SalesTransaction,
    group_by="product",
    columns=["title", "__total__"],
)
report.get_report_data()
# -> [{'title': 'Product 1', '__total__': 56}, {'title': 'Product 2', '__total__': 43}, ...]

ReportView is a thin wrapper over ReportGenerator — the same configuration syntax works in both.

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.

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

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 git@github.com: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

You might also like

Frequently asked questions

Is django-slick-reporting free to use?

django-slick-reporting is open source under the BSD-3-Clause licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does django-slick-reporting do?

The Reporting Engine for Django. Create dashboards and standalone Reports and Charts.

What is django-slick-reporting written in?

django-slick-reporting is primarily written in Python. Its source is publicly available at https://github.com/RamezIssac/django-slick-reporting, and it has 604 GitHub stars.