From 038438fba76766b7cb664dc37a5fe07c06d53ff7 Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Wed, 12 Feb 2025 09:48:31 -0300 Subject: [PATCH] insights (wip) --- app/apps/insights/urls.py | 1 + app/apps/insights/views.py | 4 ++ app/templates/insights/fragments/sankey.html | 48 ++------------------ app/templates/insights/pages/index.html | 23 ++++++++++ 4 files changed, 31 insertions(+), 45 deletions(-) create mode 100644 app/templates/insights/pages/index.html diff --git a/app/apps/insights/urls.py b/app/apps/insights/urls.py index b8f5c97..ed73eb0 100644 --- a/app/apps/insights/urls.py +++ b/app/apps/insights/urls.py @@ -3,5 +3,6 @@ from django.urls import path from . import views urlpatterns = [ + path("insights/", views.index, name="insights_index"), path("insights/sankey/", views.sankey, name="sankey"), ] diff --git a/app/apps/insights/views.py b/app/apps/insights/views.py index 2bb4cfa..3171c88 100644 --- a/app/apps/insights/views.py +++ b/app/apps/insights/views.py @@ -4,6 +4,10 @@ from apps.transactions.models import Transaction from apps.insights.utils.sankey import generate_sankey_data +def index(request): + return render(request, "insights/pages/index.html") + + def sankey(request): # Get filtered transactions transactions = Transaction.objects.filter(date__year=2025) diff --git a/app/templates/insights/fragments/sankey.html b/app/templates/insights/fragments/sankey.html index 1b7d22c..34c75e3 100644 --- a/app/templates/insights/fragments/sankey.html +++ b/app/templates/insights/fragments/sankey.html @@ -5,69 +5,27 @@