Skip to content

RamezIssac/django-slick-reporting

Repository files navigation

image

image

image

image

image

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.

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 ?

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.

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 .

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 ⭐