Package: python-slick-reporting
Django Slick ReportingA one stop reports engine with batteries included.What it does:Given a model that contains some data(ex: an OrderLine Model); Slick Reporting allows you to compute any kind of stats
(Sum, AVG, etc.. ) over any field using simple and intuitive analogy.
It also allow you to use those computation units in a time series and cross tab.FeaturesPreform Different computation grouping over the foreign keys.Those computation can also be calculated on Time Series reportlike monthly, with custom dates ability.Computation can be used on Cross tab reportsCreate your Custom CalculationOptimized for speed !… and much moreInstallationUse the package managerpipto install django-slick-reporting.pip install django-slick-reportingUsageFrom high Level,You can useSampleReportViewwhich is a subclass ofdjango.views.generic.FormViewlike this# in views.pyfromslick_reporting.viewsimportSampleReportViewfrom.modelsimportMySalesItemsclassTotalProductSales(SampleReportView):# The model where you have the datareport_model=MySalesItems# the main date to use if date filter is neededdate_field='date_placed'# or 'order__date_placed'# date_field support traversing,# date_field = 'order__date_placed'# A foreign key to group calculation ongroup_by='product'# The columns you want to displaycolumns=['title','__total_quantity__','__total__']# in your urls.pypath('url-to-report',TotalProductSales.as_view())This will return a page, with a table looking likeProductTotal QuantityTotal ValueProduct 18120Product 213240You can also do a monthly time series :# in views.pyfromslick_reporting.viewsimportSampleReportViewfrom.modelsimportMySalesItemsclassMonthlyProductSales(SampleReportView):report_model=MySalesItemsdate_field='date_placed'group_by='product'columns=['name','sku']# Analogy for time seriestime_series_pattern='monthly'time_series_columns=['__total_quantity__']hook it into yoururls.py, and it would return a page with a table looking something like this:Product NameSKUTotal Quantity
in Jan 20Total Quantity
in Feb 20Total Quantity in …Total Quantity in December 20Product 1<from product model>1015…14Product 2<from product model>1112…12Product 3<from product model>1712…17This 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 levelYou can interact with theReportGeneratorusing same syntax as used with theSampleReportView.fromslick_reporting.generatorimportReportGeneratorfrom.modelsimportMySalesModelreport=ReportGenerator(report_model=MySalesModel,group_by='product',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 documentationDocumentationAvailable onRead The DocsRunning testsCreate a virtual environment (maybe withvirtual slick_reports_test), activate it; Then ,$gitclonegit+git@github.com:ra-systems/django-slick-reporting.git$cdtests$python-mpipinstall-e..$pythonruntests.py#OrforCoveragereport$coveragerun--include=../*runtests.py[-k]$coveragehtmlContributingWe followDjango’s guidelinesguidelines.AuthorsRamez Ashraf-Initial work-RamezIssac