Powerful and Efficient reporting engine with Charting capabilities





GitHub Stars



Last Commit

3mos ago









.. image:: :target:

.. image:: :target:

.. image:: :target:

.. image:: :target:

.. image:: :target:

Django Slick Reporting

A one stop reports engine with batteries included.


  • Effortlessly create Simple, Grouped, Time series and Crosstab reports in a handful of code lines.
  • Create your Custom Calculation easily, which will be integrated with the above reports types
  • Optimized for speed.
  • Batteries included! Chart.js , & a Bootstrap form.


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

.. code-block:: console

    pip install django-slick-reporting


So you have a model that contains data, let's call it MySalesItems

You can simply use a code like this

.. code-block:: python

# in your
path('path-to-report', TotalProductSales.as_view())

# in
from django.db.models import Sum
from slick_reporting.views import SlickReportView
from slick_reporting.fields import SlickReportField
from .models import MySalesItems

class TotalProductSales(SlickReportView):

    report_model = MySalesItems
    date_field = 'date_placed'
    group_by = 'product'
    columns = ['title',
                SlickReportField.create(Sum, 'quantity') ,
                SlickReportField.create(Sum, 'value', name='sum__value') ]

    chart_settings = [{
        'type': 'column',
        'data_source': ['sum__value'],
        'plot_total': False,
        'title_source': 'title',
        'title': _('Detailed Columns'),

    }, ]

To get something like this

.. image:: :target: :alt: Shipped in View Page

You can do a monthly time series :

.. code-block:: python

# in
from slick_reporting.views import SlickReportView
from slick_reporting.fields import SlickReportField
from .models import MySalesItems

class MonthlyProductSales(SlickReportView):
    report_model = MySalesItems
    date_field = 'date_placed'
    group_by = 'product'
    columns = ['name', 'sku']

    # Analogy for time series
    time_series_pattern = 'monthly'
    time_series_columns = [SlickReportField.create(Sum, 'quantity', name='sum__quantity') ]

This would return a table looking something like this:

+--------------+----------------------+-----------------+----------------+-----------------------+-------------------------------+ | Product Name | SKU | Total Quantity | Total Quantity | Total Quantity in ... | Total Quantity in December 20 | | | | in Jan 20 | in Feb 20 | | | +--------------+----------------------+-----------------+----------------+-----------------------+-------------------------------+ | Product 1 | | 10 | 15 | ... | 14 | +--------------+----------------------+-----------------+----------------+-----------------------+-------------------------------+ | Product 2 | | 11 | 12 | ... | 12 | +--------------+----------------------+-----------------+----------------+-----------------------+-------------------------------+ | Product 3 | | 17 | 12 | ... | 17 | +--------------+----------------------+-----------------+----------------+-----------------------+-------------------------------+

This example code assumes your "MySalesItems" model contains the fields product as foreign key, quantity as number , and date_placed as a date field. It also assumes your Product model has an SKU field.. Change those to better suit your structure.


On a low level

You can interact with the ReportGenerator using same syntax as used with the SlickReportView .

.. code-block:: python

from slick_reporting.generator import ReportGenerator
from . models import MySalesModel

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

This is just a scratch, for more please visit the documentation

Batteries Included

Slick Reporting comes with

  • A Bootstrap Filter Form
  • Charting support Chart.js <>_
  • Powerful tables <>_

A Preview:

.. image:: :target: :alt: Shipped in View Page


Available on Read The Docs <>_

Road Ahead

This project is young and can use your support.

Some of the ideas / features that ought be added

  • Support Other backends like SQL Alchemy & Pandas
  • Support Grouping by non foreign key fields
  • Support Time Series and Crosstab at the same time

Running tests

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

.. code-block:: console

$ git clone
$ cd tests
$ python -m pip install -e ..

$ python
#     Or for Coverage report
$ coverage run --include=../* [-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.


  • Ramez Ashraf - Initial work - RamezIssac <>_

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 Ra 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 ⭐

Rate & Review

Great Documentation0
Easy to Use0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Unwelcoming Community0
No reviews found
Be the first to rate


No alternatives found


No tutorials found
Add a tutorial