aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/Dawn/__init__.py1
-rw-r--r--python/Dawn/templates/cds_blotter.html6
-rw-r--r--python/Dawn/templates/swaption_blotter.html6
3 files changed, 7 insertions, 6 deletions
diff --git a/python/Dawn/__init__.py b/python/Dawn/__init__.py
index b57c1f33..0d447845 100644
--- a/python/Dawn/__init__.py
+++ b/python/Dawn/__init__.py
@@ -22,3 +22,4 @@ if not app.debug:
import Dawn.views
app.jinja_env.globals.update(bus_day=Dawn.models.bus_day)
+app.jinja_env.filters["thousands"] = "{0:,.2f}".format
diff --git a/python/Dawn/templates/cds_blotter.html b/python/Dawn/templates/cds_blotter.html
index 4017e343..38ee5ab3 100644
--- a/python/Dawn/templates/cds_blotter.html
+++ b/python/Dawn/templates/cds_blotter.html
@@ -26,11 +26,11 @@
<td>{{trade.protection}}</td>
<td>{{trade.security_desc}}</td>
<td>{{trade.security_id}}</td>
- <td>{{"{0:,.2f}".format(trade.notional)}}</td>
+ <td>{{trade.notional|thousands}}</td>
<td style="text-align:right">{{"{0:,.2f}".format(trade.upfront) if trade.upfront else "-"}}</td>
<td style="text-align:right">{{"{0:,.4f}".format(trade.ref) if trade.ref else "-"}}</td>
- <td>{{trade.orig_attach if trade.orig_attach is not none else ""}}</td>
- <td>{{trade.orig_detach if trade.orig_detach is not none else ""}}</td>
+ <td>{{trade.orig_attach if trade.orig_attach is not none}}</td>
+ <td>{{trade.orig_detach if trade.orig_detach is not none}}</td>
<td><a href="{{url_for('edit_counterparty',
cpcode=trade.cp_code)}}">{{trade.name}}</a></td>
<td>{{trade.trade_type}}</td>
diff --git a/python/Dawn/templates/swaption_blotter.html b/python/Dawn/templates/swaption_blotter.html
index c22539bd..b4e04979 100644
--- a/python/Dawn/templates/swaption_blotter.html
+++ b/python/Dawn/templates/swaption_blotter.html
@@ -24,13 +24,13 @@
<tr>
<td><a href="{{url_for('trade_manage', tradeid=trade.id, kind='swaption')}}">{{trade.dealid}}</a></td>
<td>{{trade.trade_date}}</td>
- <td>{{trade.settle_date or (trade.trade_date + 3 * bus_day).date()}}</td>
+ <td>{{(trade.trade_date + 3 * bus_day).date()}}</td>
<td>{% if trade.buysell %}Buy{% else %}Sell{% endif %}</td>
- <td>{{"{0:,.2f}".format(trade.notional)}}</td>
+ <td>{{"{0:,}".format(trade.notional)}}</td>
<td>{{trade.option_type}}</td>
<td>{{trade.expiration_date}}</td>
<td>{{trade.strike}}</td>
- <td style="text-align:right">{{"{0:,.2f}".format(trade.fee)}}</td>
+ <td style="text-align:right">{{trade.fee|thousands}}</td>
<td>{{trade.security_desc}}</td>
<td>{{trade.security_id}}</td>
<td><a href="{{url_for('edit_counterparty',