summaryrefslogtreecommitdiff
path: root/app/trading/views.py
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2022-01-06 10:28:50 -0500
committerlxf <sng@luxagraf.net>2022-01-06 10:28:50 -0500
commit1b74c74fb154385d861d8a74feca75826d1c8a4b (patch)
tree09a7e8b5edf87815147625df521430df4602fea8 /app/trading/views.py
parent66b01525e454369aacaa5bd42c791aa261878562 (diff)
trad: added monthly and yearly options stats plus color to tables
Diffstat (limited to 'app/trading/views.py')
-rw-r--r--app/trading/views.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/trading/views.py b/app/trading/views.py
index 69e1ace..982fb8f 100644
--- a/app/trading/views.py
+++ b/app/trading/views.py
@@ -20,8 +20,10 @@ class LuxTradeListView(PaginatedListView):
context['options_trades_closed'] = LuxOptionsTrade.objects.filter(status=1)
context['monthly_pl'] = LuxTrade.stats.get_month_pl()
context['year_pl'] = LuxTrade.stats.get_year_pl()
- context['options_monthly_pl'] = LuxOptionsTrade.stats.get_month_pl()
- context['options_year_pl'] = LuxOptionsTrade.stats.get_year_pl()
+ #context['options_monthly_pl'] = LuxOptionsTrade.stats.get_month_pl()
+ #context['options_year_pl'] = LuxOptionsTrade.stats.get_year_pl()
+ context['options_monthly_pl'] = LuxOptionPurchase.stats.get_month_pl()
+ context['options_year_pl'] = LuxOptionPurchase.stats.get_year_pl()
context['month'] = datetime.now().strftime('%h')
context['luxoptions_purchases'] = LuxOptionPurchase.objects.filter(status=0)
return context