summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2021-07-14 10:40:01 -0400
committerluxagraf <sng@luxagraf.net>2021-07-14 10:40:01 -0400
commit1dd82675c2dc14ce03291c9844d92ab3e92c69c2 (patch)
tree49e0a9022763a564249843a19b9c020f6e2351f8
parentae4fd26611dd4d7e59f9e2b3c80cbfe0f820d9a2 (diff)
trad: added some features to list view and admin
-rw-r--r--app/trading/admin.py1
-rw-r--r--app/trading/templates/trading/list.html2
2 files changed, 2 insertions, 1 deletions
diff --git a/app/trading/admin.py b/app/trading/admin.py
index 4848ed1..1fbc685 100644
--- a/app/trading/admin.py
+++ b/app/trading/admin.py
@@ -27,6 +27,7 @@ class OptionsTradeAdmin(admin.ModelAdmin):
@admin.register(LuxTrade)
class LuxTradeAdmin(admin.ModelAdmin):
list_display = ('symbol', 'status', 'open_date', 'entry_price', 'stop_price', 'close_price', 'shares', 'amount_invested')
+ list_filter = ['status', 'open_date']
class Media:
js = ('image-loader.js', 'next-prev-links.js')
css = {
diff --git a/app/trading/templates/trading/list.html b/app/trading/templates/trading/list.html
index fd754b6..2e50fe1 100644
--- a/app/trading/templates/trading/list.html
+++ b/app/trading/templates/trading/list.html
@@ -19,8 +19,8 @@
</thead>
{% for object in open_trades %}
<tr>
+ <td><a href="">{{object.symbol}}</a></td>
<td><a href="{{object.get_absolute_url}}">{{object.date|date:"m-d-Y"}}</a></td>
- <td>{{object.symbol}}</td>
<td>${{object.entry_price}}</td>
<td>${{object.stop_price}}</td>
<td>${{object.target_price}}</td>