Begin implementing charts

This commit is contained in:
2022-07-21 13:49:48 +01:00
parent 877396f149
commit c6713934ca
5 changed files with 120 additions and 2 deletions

View File

@@ -40,6 +40,7 @@ INSTALLED_APPS = [
"django.contrib.staticfiles",
"crispy_forms",
"crispy_bulma",
"chartjs",
]
CRISPY_TEMPLATE_PACK = "bulma"
CRISPY_ALLOWED_TEMPLATE_PACKS = ("bulma",)

View File

@@ -20,7 +20,8 @@ from django.urls import include, path
from django.views.generic import TemplateView
from core.ui.views.drilldown import Drilldown
from core.views import Billing, Callback, Home, Order, Portal, Signup
from core.views import (Billing, Callback, Home, Order, Portal,
SentimentChartJSONView, Signup, VolumeChartJSONView)
urlpatterns = [
path("", Home.as_view(), name="home"),
@@ -36,4 +37,14 @@ urlpatterns = [
path("accounts/", include("django.contrib.auth.urls")),
path("accounts/signup/", Signup.as_view(), name="signup"),
path("ui/drilldown/", Drilldown.as_view(), name="drilldown"),
path(
"ui/drilldown/chart/volume/json/",
VolumeChartJSONView.as_view(),
name="chart_volume_json",
),
path(
"ui/drilldown/chart/sentiment/json/",
SentimentChartJSONView.as_view(),
name="chart_sentiment_json",
),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)