Skip to content

Commit f17bf6a

Browse files
committed
Merge branch 'release/v1.1.1'
2 parents da57d62 + 26814c9 commit f17bf6a

37 files changed

+600
-555
lines changed

.github/workflows/django.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Django CI
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
strategy:
14+
max-parallel: 4
15+
matrix:
16+
python-version: [3.8, 3.9, "3.10", 3.11]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v3
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install Dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r tests/requirements.txt
28+
- name: Run Tests
29+
run: |
30+
python runtests.py

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: 2
22

33
build:
4-
os: "ubuntu-20.04"
4+
os: "ubuntu-22.04"
55
tools:
6-
python: "3.8"
6+
python: "3.11"
77

88
# Build from the docs/ directory with Sphinx
99
sphinx:

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.1.1] - 2023-09-25
6+
- Change settings to be a dict , adding support JQUERY_URL and FONT AWESOME customization #79 & #81
7+
- Fix issue with chartjs not being loaded #80
8+
- Remove `SLICK_REPORTING_FORM_MEDIA`
9+
510
## [1.1.0] -
611
- Breaking: changed ``report_title_context_key`` default value to `report_title`
712
- Breaking: Renamed simple_report.html to report.html

README.rst

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,12 @@ Let's start by a "Group by" report. This will generate a report how much quantit
6464
group_by = "product"
6565
columns = [
6666
"name",
67-
ComputationField.create(Sum, "quantity", verbose_name="Total quantity sold", is_summable=False),
68-
ComputationField.create(Sum, "value", name="sum__value", verbose_name="Total Value sold $"),
67+
ComputationField.create(
68+
Sum, "quantity", verbose_name="Total quantity sold", is_summable=False
69+
),
70+
ComputationField.create(
71+
Sum, "value", name="sum__value", verbose_name="Total Value sold $"
72+
),
6973
]
7074
7175
chart_settings = [
@@ -83,6 +87,7 @@ Let's start by a "Group by" report. This will generate a report how much quantit
8387
),
8488
]
8589
90+
8691
# then, in urls.py
8792
path("total-sales-report", TotalProductSales.as_view())
8893
@@ -122,7 +127,7 @@ Example: How much was sold in value for each product monthly within a date perio
122127
time_series_columns = [
123128
ComputationField.create(
124129
Sum, "value", verbose_name=_("Sales Value"), name="value"
125-
) # what will be calculated for each month
130+
) # what will be calculated for each month
126131
]
127132
128133
chart_settings = [
@@ -133,12 +138,13 @@ Example: How much was sold in value for each product monthly within a date perio
133138
title_source=["name"],
134139
plot_total=True,
135140
),
136-
Chart("Total Sales [Area chart]",
137-
Chart.AREA,
138-
data_source=["value"],
139-
title_source=["name"],
140-
plot_total=False,
141-
)
141+
Chart(
142+
"Total Sales [Area chart]",
143+
Chart.AREA,
144+
data_source=["value"],
145+
title_source=["name"],
146+
plot_total=False,
147+
),
142148
]
143149
144150
@@ -233,28 +239,20 @@ You can also use locally
233239
234240
the ``create_entries`` command will generate data for the demo app
235241

242+
Documentation
243+
-------------
236244

237-
Batteries Included
238-
------------------
239-
240-
Slick Reporting comes with
241-
242-
* An auto-generated, bootstrap-ready Filter Form
243-
* Carts.js Charting support `Chart.js <https://www.chartjs.org/>`_
244-
* Highcharts.js Charting support `Highcharts.js <https://www.highcharts.com//>`_
245-
* Datatables `datatables.net <https://datatables.net/>`_
245+
Available on `Read The Docs <https://django-slick-reporting.readthedocs.io/en/latest/>`_
246246

247-
A Preview:
247+
You can run documentation locally
248248

249-
.. image:: https://i.ibb.co/SvxTM23/Selection-294.png
250-
:target: https://i.ibb.co/SvxTM23/Selection-294.png
251-
:alt: Shipped in View Page
249+
.. code-block:: console
252250
251+
<activate your virtual environment>
252+
cd docs
253+
pip install -r requirements.txt
254+
sphinx-build -b html source build
253255
254-
Documentation
255-
-------------
256-
257-
Available on `Read The Docs <https://django-slick-reporting.readthedocs.io/en/latest/>`_
258256
259257
Road Ahead
260258
----------

demo_proj/demo_app/helpers.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
("product-sales-per-country-crosstab", reports.ProductSalesPerCountryCrosstab),
1212
("last-10-sales", reports.LastTenSales),
1313
("total-product-sales-with-custom-form", reports.TotalProductSalesWithCustomForm),
14-
1514
]
1615

1716
GROUP_BY = [
@@ -27,7 +26,7 @@
2726
("time-series-with-custom-dates", reports.TimeSeriesReportWithCustomDates),
2827
("time-series-with-custom-dates-and-title", reports.TimeSeriesReportWithCustomDatesAndCustomTitle),
2928
("time-series-without-group-by", reports.TimeSeriesWithoutGroupBy),
30-
('time-series-with-group-by-custom-queryset', reports.TimeSeriesReportWithCustomGroupByQueryset),
29+
("time-series-with-group-by-custom-queryset", reports.TimeSeriesReportWithCustomGroupByQueryset),
3130
]
3231

3332
CROSSTAB = [
@@ -38,14 +37,14 @@
3837
("crosstab-report-custom-verbose-name", reports.CrossTabReportWithCustomVerboseName),
3938
("crosstab-report-custom-verbose-name-2", reports.CrossTabReportWithCustomVerboseNameCustomFilter),
4039
("crosstab-report-with-time-series", reports.CrossTabWithTimeSeries),
41-
40+
]
41+
OTHER = [
42+
("chartjs-examples", reports.ChartJSExample),
4243
]
4344

4445

4546
def get_urls_patterns():
4647
urls = []
47-
for name, report in TUTORIAL + GROUP_BY + TIME_SERIES + CROSSTAB:
48+
for name, report in TUTORIAL + GROUP_BY + TIME_SERIES + CROSSTAB + OTHER:
4849
urls.append(path(f"{name}/", report.as_view(), name=name))
4950
return urls
50-
51-

0 commit comments

Comments
 (0)