From f33fa7a87769a444acbc388037c0c71b3b7fc36a Mon Sep 17 00:00:00 2001 From: lxf Date: Tue, 4 Jan 2022 10:46:41 -0500 Subject: trad: changed default and added some rounding to template --- app/trading/models.py | 2 +- app/trading/templates/trading/list.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/trading') 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 @@ ${{object.total_invested}} ${{object.trade_risk}} - {{object.portfolio_risk}}% + {{object.portfolio_risk|floatformat:2}}% ${{object.sell_half_at|floatformat:2}} ${{object.stop_price|floatformat:2}} -- cgit v1.2.3-70-g09d2