summaryrefslogtreecommitdiff
path: root/app/trading
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2022-01-04 10:46:41 -0500
committerlxf <sng@luxagraf.net>2022-01-04 10:46:41 -0500
commitf33fa7a87769a444acbc388037c0c71b3b7fc36a (patch)
tree04a5d439d5fa24c3413ff279edc22161208ec866 /app/trading
parent84cbab3bdc9d1b59922e755fae3435ce0a5f2dbe (diff)
trad: changed default and added some rounding to template
Diffstat (limited to 'app/trading')
-rw-r--r--app/trading/models.py2
-rw-r--r--app/trading/templates/trading/list.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/trading/models.py b/app/trading/models.py
index 212d196..720b834 100644
--- a/app/trading/models.py
+++ b/app/trading/models.py
@@ -214,7 +214,7 @@ class LuxOptionPurchase(models.Model):
(0, 'Open'),
(1, 'Closed'),
)
- status = models.IntegerField(choices=STATUS, default=1)
+ status = models.IntegerField(choices=STATUS, default=0)
class Meta:
ordering = ('-open_date',)
diff --git a/app/trading/templates/trading/list.html b/app/trading/templates/trading/list.html
index bf8104b..3f6c3c0 100644
--- a/app/trading/templates/trading/list.html
+++ b/app/trading/templates/trading/list.html
@@ -33,7 +33,7 @@
<td>${{object.total_invested}}</td>
<td>${{object.trade_risk}}</td>
- <td>{{object.portfolio_risk}}%</td>
+ <td>{{object.portfolio_risk|floatformat:2}}%</td>
<td>${{object.sell_half_at|floatformat:2}}</td>
<td>${{object.stop_price|floatformat:2}}</td>
<td class="notes">