Skip to main content
https://img.shields.io/pypi/v/django-slick-reporting.svg https://img.shields.io/pypi/pyversions/django-slick-reporting.svg https://img.shields.io/readthedocs/django-slick-reporting https://api.travis-ci.com/ra-systems/django-slick-reporting.svg?branch=master https://img.shields.io/codecov/c/github/ra-systems/django-slick-reporting

Django Slick Reporting

A one stop reports engine with batteries included.

Features

  • Effortlessly create Simple, Grouped, Time series and Crosstab reports in a handful of code lines.

  • Create Chart(s) for your reports with a single line of code.

  • Create Custom complex Calculation.

  • Optimized for speed.

  • Easily extendable.

Installation

Use the package manager pip to install django-slick-reporting.

pip install django-slick-reporting

Usage

So we have a model SalesTransaction which contains typical data about a sale. We can extract different kinds of information for that model.

Let’s start by a “Group by” report. This will generate a report how much quantity and value was each product sold within a certain time.

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


class TotalProductSales(ReportView):
    report_model = SalesTransaction
    date_field = "date"
    group_by = "product"
    columns = [
        "name",
        ComputationField.create(
            Sum, "quantity", verbose_name="Total quantity sold", is_summable=False
        ),
        ComputationField.create(
            Sum, "value", name="sum__value", verbose_name="Total Value sold $"
        ),
    ]

    chart_settings = [
        Chart(
            "Total sold $",
            Chart.BAR,
            data_source=["sum__value"],
            title_source=["name"],
        ),
        Chart(
            "Total sold $ [PIE]",
            Chart.PIE,
            data_source=["sum__value"],
            title_source=["name"],
        ),
    ]


# then, in urls.py
path("total-sales-report", TotalProductSales.as_view())

With this code, you will get something like this:

Shipped in View Page

Time Series

A Time series report is a report that is generated for a periods of time. The period can be daily, weekly, monthly, yearly or custom. Calculations will be performed for each period in the time series.

Example: How much was sold in value for each product monthly within a date period ?

# in views.py
from slick_reporting.views import ReportView
from slick_reporting.fields import ComputationField
from .models import SalesTransaction


class MonthlyProductSales(ReportView):
    report_model = SalesTransaction
    date_field = "date"
    group_by = "product"
    columns = ["name", "sku"]

    time_series_pattern = "monthly"
    # or "yearly" , "weekly" , "daily" , others and custom patterns
    time_series_columns = [
        ComputationField.create(
            Sum, "value", verbose_name=_("Sales Value"), name="value"
        )  # what will be calculated for each month
    ]

    chart_settings = [
        Chart(
            _("Total Sales Monthly"),
            Chart.PIE,
            data_source=["value"],
            title_source=["name"],
            plot_total=True,
        ),
        Chart(
            "Total Sales [Area chart]",
            Chart.AREA,
            data_source=["value"],
            title_source=["name"],
            plot_total=False,
        ),
    ]
Time Series Report

Cross Tab

Use crosstab reports, also known as matrix reports, to show the relationships between three or more query items. Crosstab reports show data in rows and columns with information summarized at the intersection points.

# in views.py
from slick_reporting.views import ReportView
from slick_reporting.fields import ComputationField
from .models import MySalesItems


class MyCrosstabReport(ReportView):

    crosstab_field = "client"
    crosstab_ids = [1, 2, 3]
    crosstab_columns = [
        ComputationField.create(Sum, "value", verbose_name=_("Value for")),
    ]
    crosstab_compute_remainder = True

    columns = [
        "some_optional_field",
        # You can customize where the crosstab columns are displayed in relation to the other columns
        "__crosstab__",
        # This is the same as the Same as the calculation in the crosstab, but this one will be on the whole set. IE total value
        ComputationField.create(Sum, "value", verbose_name=_("Total Value")),
    ]
Homepage

Low level

The view is a wrapper over the ReportGenerator class, which is the core of the reporting engine. You can interact with the ReportGenerator using same syntax as used with the ReportView .

from slick_reporting.generator import ReportGenerator
from .models import MySalesModel


class MyReport(ReportGenerator):
    report_model = MySalesModel
    group_by = "product"
    columns = ["title", "__total__"]


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

This is just a scratch of what you can do and customize.

Demo site

Available on Django Slick Reporting

You can also use locally

# clone the repo
git clone https://github.com/ra-systems/django-slick-reporting.git
# create a virtual environment and activate it
python -m venv /path/to/new/virtual/environment
source /path/to/new/virtual/environment/bin/activate

cd django-slick-reporting/demo_proj
pip install -r requirements.txt
python manage.py migrate
python manage.py create_entries
python manage.py runserver

the create_entries command will generate data for the demo app

Documentation

Available on Read The Docs

You can run documentation locally

<activate your virtual environment>
cd docs
pip install -r requirements.txt
sphinx-build -b html source build

Road Ahead

  • Continue on enriching the demo project

  • Add the dashboard capabilities

Running tests

Create a virtual environment (maybe with virtual slick_reports_test), activate it; Then ,

$ git clone git+git@github.com:ra-systems/django-slick-reporting.git
$ cd tests
$ python -m pip install -e ..

$ python runtests.py
#     Or for Coverage report
$ coverage run --include=../* runtests.py [-k]
$ coverage html

Support & Contributing

Please consider star the project to keep an eye on it. Your PRs, reviews are most welcome and needed.

We honor the well formulated Django’s guidelines to serve as contribution guide here too.

Authors

Cross Reference

If you like this package, chances are you may like those packages too!

Django Tabular Permissions Display Django permissions in a HTML table that is translatable and easy customized.

Django ERP Framework A framework to build business solutions with ease.

If you find this project useful or promising , You can support us by a github ⭐

Metadata

Release files for django-slick-reporting 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-slick-reporting 1.4.0
File Size Uploaded
django_slick_reporting-1.4.0.tar.gz 48.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-slick-reporting 1.4.0
File Interpreter ABI Platform
django_slick_reporting-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 106.9 kB

Release files / django_slick_reporting-1.4.0.tar.gz

Download URL django_slick_reporting-1.4.0.tar.gz
Size 48.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6a930f7c911200bca80cf768f84765824198f45c4cae44486b388998b943d27a
BLAKE2b-256 checksum
How to use checksums
fc809577b4cb4349a90c7149457d1f2264a1b027b158c3a256e9728c42d024a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 2, 2026.

Transparency log

Release files / django_slick_reporting-1.4.0-py3-none-any.whl

Download URL django_slick_reporting-1.4.0-py3-none-any.whl
Size 58.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a808343f230e13e365fcd87b34dfb70737c78286eb422b023238b43fb2577f94
BLAKE2b-256 checksum
How to use checksums
2f5521b84b708e3b0d68f98ad48892dac85bf60fd1d226c918fc5c4a64fffaa6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.1

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.0

1 release file

0.6.8

1 release file

0.6.7

1 release file

0.6.6

1 release file

0.6.5

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.8

1 release file

0.5.7

1 release file

0.5.6

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page