django-reportcraft 2025.3.20__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. django_reportcraft-2025.3.20/LICENSE +21 -0
  2. django_reportcraft-2025.3.20/PKG-INFO +99 -0
  3. django_reportcraft-2025.3.20/README.md +62 -0
  4. django_reportcraft-2025.3.20/pyproject.toml +66 -0
  5. django_reportcraft-2025.3.20/reportcraft/__init__.py +0 -0
  6. django_reportcraft-2025.3.20/reportcraft/admin.py +10 -0
  7. django_reportcraft-2025.3.20/reportcraft/apps.py +15 -0
  8. django_reportcraft-2025.3.20/reportcraft/forms.py +911 -0
  9. django_reportcraft-2025.3.20/reportcraft/migrations/0001_initial.py +94 -0
  10. django_reportcraft-2025.3.20/reportcraft/migrations/__init__.py +0 -0
  11. django_reportcraft-2025.3.20/reportcraft/models.py +594 -0
  12. django_reportcraft-2025.3.20/reportcraft/static/reportcraft/reportcraft.js +838 -0
  13. django_reportcraft-2025.3.20/reportcraft/static/reportcraft/reportcraft.min.css +3 -0
  14. django_reportcraft-2025.3.20/reportcraft/static/reportcraft/reportcraft.min.css.map +9 -0
  15. django_reportcraft-2025.3.20/reportcraft/static/reportcraft/reportcraft.min.js +1 -0
  16. django_reportcraft-2025.3.20/reportcraft/static/reportcraft/reportcraft.scss +435 -0
  17. django_reportcraft-2025.3.20/reportcraft/templates/reportcraft/base.html +5 -0
  18. django_reportcraft-2025.3.20/reportcraft/templates/reportcraft/index.html +39 -0
  19. django_reportcraft-2025.3.20/reportcraft/templates/reportcraft/list.html +20 -0
  20. django_reportcraft-2025.3.20/reportcraft/templates/reportcraft/report-editor.html +82 -0
  21. django_reportcraft-2025.3.20/reportcraft/templates/reportcraft/report-list-tools.html +7 -0
  22. django_reportcraft-2025.3.20/reportcraft/templates/reportcraft/report.html +37 -0
  23. django_reportcraft-2025.3.20/reportcraft/templates/reportcraft/source-editor.html +162 -0
  24. django_reportcraft-2025.3.20/reportcraft/templates/reportcraft/source-list-tools.html +7 -0
  25. django_reportcraft-2025.3.20/reportcraft/templates/reportcraft/tool-icon.html +7 -0
  26. django_reportcraft-2025.3.20/reportcraft/templatetags/__init__.py +0 -0
  27. django_reportcraft-2025.3.20/reportcraft/templatetags/reportcraft.py +224 -0
  28. django_reportcraft-2025.3.20/reportcraft/urls.py +35 -0
  29. django_reportcraft-2025.3.20/reportcraft/utils.py +583 -0
  30. django_reportcraft-2025.3.20/reportcraft/views.py +305 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Michel 4J
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.3
2
+ Name: django-reportcraft
3
+ Version: 2025.3.20
4
+ Summary: A Django reusable App for dynamically designing and generating reports.
5
+ License: MIT
6
+ Author: Michel Fodje
7
+ Author-email: michel4j@gmail.com
8
+ Requires-Python: >=3.10
9
+ Classifier: Environment :: Web Environment
10
+ Classifier: Framework :: Django
11
+ Classifier: Framework :: Django :: 4.2
12
+ Classifier: Framework :: Django :: 5.0
13
+ Classifier: Framework :: Django :: 5.1
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: Internet :: WWW/HTTP
24
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
25
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
26
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
+ Requires-Dist: django (>=4.2.20,<6.0.0)
28
+ Requires-Dist: django-crisp-modals (>=2025.3.29,<2026.0.0)
29
+ Requires-Dist: django-itemlist (>=2025.3.11,<2026.0.0)
30
+ Requires-Dist: numpy (>=2.2.4,<3.0.0)
31
+ Requires-Dist: pygments (>=2.19.1,<3.0.0)
32
+ Requires-Dist: pyparsing (>=3.2.1,<4.0.0)
33
+ Project-URL: Documentation, https://michel4j.github.io/django-reportcraft/
34
+ Project-URL: Homepage, https://github.com/michel4j/django-reportcraft
35
+ Project-URL: Issues, https://github.com/michel4j/django-reportcraft/issues
36
+ Description-Content-Type: text/markdown
37
+
38
+ # Django ReportCraft
39
+ A Django reusable App for dynamically designing and generating data visualization and
40
+ business intelligence reports
41
+
42
+ ## Summary of Features
43
+
44
+ ### Report Creation
45
+ - Create and manage reports through a graphical designer.
46
+ - Easily add new report entries using the intuitive interface.
47
+
48
+ ### Data Sources & Models
49
+ - **Data Sources:** Configure models that provide data for reports.
50
+ - Define the data source name, grouping fields, and record limit.
51
+ - **Data Source Models:**
52
+ - Add models to a data source.
53
+ - Specify group expressions for data aggregation.
54
+
55
+ ### Data Fields & Expressions
56
+ - Configure fields with attributes such as name, label, default value, and precision.
57
+ - **Expressions:**
58
+ - Use arithmetic operators (`+`, `-`, `*`, `/`, unary negation).
59
+ - Reference Django field names using CamelCase and related fields with the `.` operator.
60
+ - Group and nest expressions using parentheses.
61
+ - Use string literals enclosed in quotes.
62
+ - **Supported Functions:**
63
+ - Django database functions (e.g., `Sum`, `Avg`, `Count`, etc.)
64
+ - Custom functions (e.g., `ShiftStart`, `ShiftEnd`, `Hours`, `Minutes`, `DisplayName`).
65
+
66
+ ### Report Entry Types & Configurations
67
+ - **Table Entry:**
68
+ - Configure rows, columns, values, column totals, row totals, and transpose option.
69
+ - **Bar Chart Entry:**
70
+ - Set the X-axis and one or more Y-axis fields.
71
+ - Options for sorting, color schemes, stacking, label wrapping, and orientation.
72
+ - **Pie Chart Entry:**
73
+ - Define value and label fields for pie slices with color customization.
74
+ - **XY Plot Entry:**
75
+ - Configure dual Y-axes for left (Y1) and right (Y2).
76
+ - Supports both line and scatter plot options.
77
+ - **List Entry:**
78
+ - Define multiple columns with sorting and ordering features.
79
+ - **Histogram Entry:**
80
+ - Choose a numeric field, configure the number of bins, and select a color scheme.
81
+ - **Text & Rich Text Entries:**
82
+ - Display plain text or markdown formatted rich text.
83
+
84
+ ### Demo Application
85
+ A demo site showcasing an example configuration of various features is available in the repository. After cloning
86
+ the repository,
87
+
88
+ ```bash
89
+ poetry install
90
+ ./manage.py migrate
91
+ ./manage.py createsuperuser
92
+ ./manage.py runserver
93
+
94
+ Open the browser to http://localhost:8000/admin and log in with the superuser credentials created in the previous step.
95
+ Click the "View Site" link in the top right corner of the page to access the main page, also accessible
96
+ from http://localhost:8000.
97
+
98
+ ### Documentation
99
+ Detailed documentation and screenshots are available at https://michel4j.github.io/django-reportcraft/.
@@ -0,0 +1,62 @@
1
+ # Django ReportCraft
2
+ A Django reusable App for dynamically designing and generating data visualization and
3
+ business intelligence reports
4
+
5
+ ## Summary of Features
6
+
7
+ ### Report Creation
8
+ - Create and manage reports through a graphical designer.
9
+ - Easily add new report entries using the intuitive interface.
10
+
11
+ ### Data Sources & Models
12
+ - **Data Sources:** Configure models that provide data for reports.
13
+ - Define the data source name, grouping fields, and record limit.
14
+ - **Data Source Models:**
15
+ - Add models to a data source.
16
+ - Specify group expressions for data aggregation.
17
+
18
+ ### Data Fields & Expressions
19
+ - Configure fields with attributes such as name, label, default value, and precision.
20
+ - **Expressions:**
21
+ - Use arithmetic operators (`+`, `-`, `*`, `/`, unary negation).
22
+ - Reference Django field names using CamelCase and related fields with the `.` operator.
23
+ - Group and nest expressions using parentheses.
24
+ - Use string literals enclosed in quotes.
25
+ - **Supported Functions:**
26
+ - Django database functions (e.g., `Sum`, `Avg`, `Count`, etc.)
27
+ - Custom functions (e.g., `ShiftStart`, `ShiftEnd`, `Hours`, `Minutes`, `DisplayName`).
28
+
29
+ ### Report Entry Types & Configurations
30
+ - **Table Entry:**
31
+ - Configure rows, columns, values, column totals, row totals, and transpose option.
32
+ - **Bar Chart Entry:**
33
+ - Set the X-axis and one or more Y-axis fields.
34
+ - Options for sorting, color schemes, stacking, label wrapping, and orientation.
35
+ - **Pie Chart Entry:**
36
+ - Define value and label fields for pie slices with color customization.
37
+ - **XY Plot Entry:**
38
+ - Configure dual Y-axes for left (Y1) and right (Y2).
39
+ - Supports both line and scatter plot options.
40
+ - **List Entry:**
41
+ - Define multiple columns with sorting and ordering features.
42
+ - **Histogram Entry:**
43
+ - Choose a numeric field, configure the number of bins, and select a color scheme.
44
+ - **Text & Rich Text Entries:**
45
+ - Display plain text or markdown formatted rich text.
46
+
47
+ ### Demo Application
48
+ A demo site showcasing an example configuration of various features is available in the repository. After cloning
49
+ the repository,
50
+
51
+ ```bash
52
+ poetry install
53
+ ./manage.py migrate
54
+ ./manage.py createsuperuser
55
+ ./manage.py runserver
56
+
57
+ Open the browser to http://localhost:8000/admin and log in with the superuser credentials created in the previous step.
58
+ Click the "View Site" link in the top right corner of the page to access the main page, also accessible
59
+ from http://localhost:8000.
60
+
61
+ ### Documentation
62
+ Detailed documentation and screenshots are available at https://michel4j.github.io/django-reportcraft/.
@@ -0,0 +1,66 @@
1
+ [project]
2
+ name = "django-reportcraft"
3
+ description = "A Django reusable App for dynamically designing and generating reports."
4
+ authors = [
5
+ {name = "Michel Fodje",email = "michel4j@gmail.com"}
6
+ ]
7
+ license = "MIT"
8
+ readme = "README.md"
9
+ requires-python = ">=3.10"
10
+ dependencies = [
11
+ "django (>=4.2.20,<6.0.0)",
12
+ "django-crisp-modals (>=2025.3.29,<2026.0.0)",
13
+ "django-itemlist (>=2025.3.11,<2026.0.0)",
14
+ "pyparsing (>=3.2.1,<4.0.0)",
15
+ "pygments (>=2.19.1,<3.0.0)",
16
+ "numpy (>=2.2.4,<3.0.0)",
17
+ ]
18
+ classifiers = [
19
+ "Environment :: Web Environment",
20
+ "Framework :: Django",
21
+ "Framework :: Django :: 4.2",
22
+ "Framework :: Django :: 5.0",
23
+ "Framework :: Django :: 5.1",
24
+ "Intended Audience :: Developers",
25
+ "License :: OSI Approved :: MIT License",
26
+ "Operating System :: OS Independent",
27
+ "Programming Language :: Python",
28
+ "Programming Language :: Python :: 3",
29
+ "Programming Language :: Python :: 3.10",
30
+ "Programming Language :: Python :: 3.11",
31
+ "Programming Language :: Python :: 3.12",
32
+ "Programming Language :: Python :: 3.13",
33
+ "Topic :: Internet :: WWW/HTTP",
34
+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
35
+ "Topic :: Software Development :: Libraries :: Application Frameworks",
36
+ "Topic :: Software Development :: Libraries :: Python Modules"
37
+ ]
38
+ dynamic = []
39
+ version = "2025.3.20"
40
+
41
+ [project.urls]
42
+ Homepage = "https://github.com/michel4j/django-reportcraft"
43
+ Issues = "https://github.com/michel4j/django-reportcraft/issues"
44
+ Documentation = "https://michel4j.github.io/django-reportcraft/"
45
+
46
+ [tool.poetry]
47
+ packages = [
48
+ { include = "reportcraft", from = "." },
49
+ ]
50
+
51
+ [build-system]
52
+ requires = ["poetry-core>=2.0.0,<3.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
53
+ build-backend = "poetry_dynamic_versioning.backend"
54
+
55
+ [tool.poetry.group.dev.dependencies]
56
+ Sphinx = ">=4.2.0"
57
+ sphinx-rtd-theme = ">=1.0.0"
58
+ sphinxcontrib-napoleon = ">=0.7"
59
+
60
+ [tool.poetry.requires-plugins]
61
+ poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] }
62
+
63
+ [tool.poetry-dynamic-versioning]
64
+ enable = false
65
+ vcs = "git"
66
+ format = "{base}.{revision}{distance}"
File without changes
@@ -0,0 +1,10 @@
1
+ from django.contrib import admin
2
+ from . import models
3
+
4
+
5
+ admin.site.register(models.DataModel)
6
+ admin.site.register(models.DataSource)
7
+ admin.site.register(models.DataField)
8
+ admin.site.register(models.Report)
9
+ admin.site.register(models.Entry)
10
+
@@ -0,0 +1,15 @@
1
+ from django.apps import AppConfig
2
+
3
+
4
+ class ReportsConfig(AppConfig):
5
+ default_auto_field = 'django.db.models.BigAutoField'
6
+ name = 'reportcraft'
7
+
8
+ def ready(self):
9
+ from django.conf import settings
10
+ settings = settings._wrapped.__dict__
11
+ settings.setdefault('REPORTCRAFT_APPS', [])
12
+ settings.setdefault('REPORTCRAFT_MIXINS', {
13
+ 'VIEW': [],
14
+ 'EDIT': ['django.contrib.auth.mixins.LoginRequiredMixin'],
15
+ })