From 2d7f73a5318b535cb58c7b6e3151c06853ce4b1d Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Fri, 8 Jan 2021 07:56:27 +0100 Subject: [PATCH] display total amounts for wallet --- apps/monitor/templates/monitor.html | 9 +++++++++ apps/monitor/views.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/monitor/templates/monitor.html b/apps/monitor/templates/monitor.html index c6858b3..b29ab10 100644 --- a/apps/monitor/templates/monitor.html +++ b/apps/monitor/templates/monitor.html @@ -59,6 +59,15 @@ {% endfor %} + +


+ +

Total wallet

+ +Total investment: {{total_investment|floatformat:2}} EUR
+Virtual value of wallet: {{current_value|floatformat:2}} EUR
+Total tax free: {{total_tax_free|floatformat:2}} EUR
+ {% endblock %} diff --git a/apps/monitor/views.py b/apps/monitor/views.py index 5339047..1c3170e 100644 --- a/apps/monitor/views.py +++ b/apps/monitor/views.py @@ -19,4 +19,4 @@ def monitor(request): cryptos.append({"crypto": crypto, "rateEUR": rateEUR, "rateUSD": rateUSD, **out2}) - return render(request,"monitor.html",{'cryptos':cryptos}) + return render(request,"monitor.html",{'cryptos':cryptos, 'total_tax_free': total_tax_free, 'total_investment': total_investment, 'current_value': current_value})