summaryrefslogtreecommitdiff
path: root/app/trading
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2021-07-22 09:40:19 -0400
committerluxagraf <sng@luxagraf.net>2021-07-22 09:40:19 -0400
commite0148de2b8a6cbf8fef2b3e4c66249e58be619b7 (patch)
tree5f24b13dc899d92bd650144509cdc2a722c51386 /app/trading
parent328f4973ced1f992d19b968186817b5140a4bb3b (diff)
trad: Added watched options to main list
Diffstat (limited to 'app/trading')
-rw-r--r--app/trading/templates/trading/list.html2
-rw-r--r--app/trading/views.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/trading/templates/trading/list.html b/app/trading/templates/trading/list.html
index 539ba49..5caa993 100644
--- a/app/trading/templates/trading/list.html
+++ b/app/trading/templates/trading/list.html
@@ -115,7 +115,7 @@
</tr>
</thead>
{% for object in options_trades %}
- <tr {%if object.is_wanderer %}class="wanderer-trade"{% endif %}>
+ <tr class="{%if object.is_wanderer %}wanderer-trade {% endif %}{%if object.status == 2%}watching{% endif %}">
<td><a href="https://www.tradingview.com/chart/?symbol={{object.symbol}}" target="_blank">{{object.symbol}}</a></td>
<td><a href="{{object.get_absolute_url}}">{{object.date|date:"m-d-Y"}}</a></td>
<td>
diff --git a/app/trading/views.py b/app/trading/views.py
index ae4098c..d9d8f45 100644
--- a/app/trading/views.py
+++ b/app/trading/views.py
@@ -14,7 +14,7 @@ class LuxTradeListView(PaginatedListView):
context = super(LuxTradeListView, self).get_context_data(**kwargs)
context['open_trades'] = LuxTrade.objects.filter(status=0)
context['watch_trades'] = LuxTrade.objects.filter(status=2)
- context['options_trades'] = LuxOptionsTrade.objects.filter(status=0)
+ context['options_trades'] = LuxOptionsTrade.objects.filter(status__in=[0,2])
context['monthly_pl'] = LuxTrade.stats.get_month_pl()
context['month'] = datetime.now().strftime('%h')
return context