diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/trading/models.py | 2 | ||||
-rw-r--r-- | app/trading/templates/trading/list.html | 28 | ||||
-rw-r--r-- | app/trading/views.py | 1 |
3 files changed, 5 insertions, 26 deletions
diff --git a/app/trading/models.py b/app/trading/models.py index 40762db..63febc2 100644 --- a/app/trading/models.py +++ b/app/trading/models.py @@ -129,7 +129,7 @@ class LuxTrade(models.Model): pl = models.FloatField(null=True) class Meta: - ordering = ('-open_date',) + ordering = ('status', '-open_date',) get_latest_by = 'open_date' def __str__(self): diff --git a/app/trading/templates/trading/list.html b/app/trading/templates/trading/list.html index 7694583..f689d9d 100644 --- a/app/trading/templates/trading/list.html +++ b/app/trading/templates/trading/list.html @@ -1,6 +1,6 @@ {% extends 'trading/base.html' %} {% block content %} - <h3>Current Trades</h3> + <h3>Stock Trades</h3> <table> <thead> <tr> @@ -44,29 +44,8 @@ </td> </tr> {% endfor %} - </table> - - <h3>Watching </h3> - <table> - <thead> - <tr> - <th>Symbol</th> - <th>Open Date</th> - <th>Entry Price</th> - <th>Stop</th> - <th>Target</th> - <th>Shares</th> - <th>Total Invested</th> - <th>$ at Risk</th> - <th>$ Goal</th> - <th>% Goal</th> - <th>Risk/Reward</th> - <th>Price Calc</th> - <th>Notes</th> - </tr> - </thead> {% for object in watch_trades %} - <tr {%if object.is_wanderer %}class="wanderer-trade"{% endif %}> + <tr class="{%if forloop.first %}border-row {%endif%}{%if object.is_wanderer %}wanderer-trade{% 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>${{object.entry_price}}</td> @@ -94,8 +73,7 @@ </tr> {% endfor %} </table> - - <h3>Current Options Trades</h3> + <h3>Options Trades</h3> <table> <thead> <tr> diff --git a/app/trading/views.py b/app/trading/views.py index d9d8f45..737dfb5 100644 --- a/app/trading/views.py +++ b/app/trading/views.py @@ -52,6 +52,7 @@ class LuxOptionsTradeDetailView(UpdateView): 'contract_price', 'number_contracts', 'delta' + 'notes' ] template_name = 'trading/update_options_form.html' success_url = '/trading/' |