diff --git a/requirements.txt b/requirements.txt index a82c2ba..80815ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,4 +33,4 @@ tomli==2.0.1 typing_extensions==4.8.0 urllib3==2.0.7 virtualenv==20.24.6 -whitenoise==6.6.0 +whitenoise==6.6.0 \ No newline at end of file diff --git a/smartreport_app/kb_interface.py b/smartreport_app/kb_interface.py index a6b3479..3e1e91f 100644 --- a/smartreport_app/kb_interface.py +++ b/smartreport_app/kb_interface.py @@ -7,7 +7,6 @@ def kb_interface(kpi_name, params): if plot_type == 'line': response = { 'labels': ['January', 'February', 'March', 'April', 'May', 'June', 'July'], - 'data' : { 'datasets': [{ 'label': 'massa di filippo', 'data': [65, 59, 50, 40, 30, 20, 10], @@ -15,7 +14,6 @@ def kb_interface(kpi_name, params): 'borderColor': 'rgb(75, 192, 192)', 'tension': 0.1 }] - } } return response diff --git a/smartreport_app/models.py b/smartreport_app/models.py index 0cc2783..8aa01ac 100644 --- a/smartreport_app/models.py +++ b/smartreport_app/models.py @@ -15,7 +15,8 @@ class UserType(models.TextChoices): "line", "bar", "pie", - "scatter", + "doughnut", + "radar", ) @@ -123,7 +124,7 @@ class DashboardLayout(models.Model): choices=UserType.choices, ) - layout = models.CharField(max_length=2048) + layout = models.JSONField() def __str__(self): return self.name diff --git a/page_render.py b/smartreport_app/page_render.py similarity index 100% rename from page_render.py rename to smartreport_app/page_render.py