summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/trading/templates/trading/list.html35
-rw-r--r--app/trading/views.py2
2 files changed, 34 insertions, 3 deletions
diff --git a/app/trading/templates/trading/list.html b/app/trading/templates/trading/list.html
index 0fdc03d..3063533 100644
--- a/app/trading/templates/trading/list.html
+++ b/app/trading/templates/trading/list.html
@@ -1,7 +1,7 @@
{% extends 'trading/base.html' %}
{% block content %}
- <h3>WON Options Trades</h3>
+ <h3>Options</h3>
<table class="options">
<thead>
<tr>
@@ -149,7 +149,7 @@
- <h3>Open Stock Trades</h3>
+ <h3>Stocks</h3>
<table>
<thead>
<tr>
@@ -221,6 +221,37 @@
</td>
</tr>
{% endfor %}
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td>{{month}} P/L:</td>
+ <td>{{monthly_pl.pl__sum}}</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td>YTD P/L:</td>
+ <td>{{year_pl.pl__sum}}</td>
+ </tr>
</table>
diff --git a/app/trading/views.py b/app/trading/views.py
index 86556f3..82904ca 100644
--- a/app/trading/views.py
+++ b/app/trading/views.py
@@ -31,7 +31,7 @@ class LuxTradeListView(PaginatedListView):
context['options_monthly_pl'] = LuxOptionPurchase.stats.get_month_pl()
context['options_year_pl'] = LuxOptionPurchase.stats.get_year_pl()
context['month'] = timezone.now().strftime('%h')
- context['luxoptions_purchases'] = LuxOptionPurchase.objects.all()
+ context['luxoptions_purchases'] = LuxOptionPurchase.objects.filter(close_date__range=(start_date, end_date))
return context
def get_queryset(self):