aboutsummaryrefslogtreecommitdiffstats
path: root/python/Dawn
diff options
context:
space:
mode:
Diffstat (limited to 'python/Dawn')
-rw-r--r--python/Dawn/models.py5
-rw-r--r--python/Dawn/templates/counterparties.html6
2 files changed, 7 insertions, 4 deletions
diff --git a/python/Dawn/models.py b/python/Dawn/models.py
index e0d9055a..8a6deb56 100644
--- a/python/Dawn/models.py
+++ b/python/Dawn/models.py
@@ -37,6 +37,7 @@ class Counterparties(db.Model):
valuation_contact4 = db.Column(db.String)
valuation_email4 = db.Column(EmailType)
notes = db.Column(db.String)
+ instructions = db.Column(db.String, info={'form_field_class': FileField})
BOND_STRAT = ENUM('M_STR_MAV', 'M_STR_MEZZ', 'CSO_TRANCH',
'M_CLO_BB20', 'M_CLO_AAA', 'M_CLO_BBB', 'M_MTG_IO', 'M_MTG_THRU',
@@ -69,10 +70,10 @@ class BondDeal(db.Model):
isin = db.Column(db.String(12), info={'validators': Length(12, 12),
'filters': [lambda x: x or None]})
description = db.Column(db.String(32), nullable=False)
- buysell = db.Column(db.Boolean, nullable = False, info={'choices':[(0, 'sell'), (1, 'buy')]})
+ buysell = db.Column(db.Boolean, nullable = False, info={'choices':[(0, 'sell'), (1, 'buy')],
+ 'filters': [lambda x: x=='1']})
faceamount = db.Column(db.Float, nullable=False)
price = db.Column(db.Float, nullable=False)
- account = db.Column(db.String(10))
accrued = db.Column(db.Float, nullable = False)
asset_class = db.Column(ASSET_CLASS)
ticket = db.Column(db.String, info={'form_field_class': FileField})
diff --git a/python/Dawn/templates/counterparties.html b/python/Dawn/templates/counterparties.html
index f0b0f60a..39883e02 100644
--- a/python/Dawn/templates/counterparties.html
+++ b/python/Dawn/templates/counterparties.html
@@ -19,6 +19,7 @@
<td>Valuation Contact3</td>
<td>Valuation Contact4</td>
<td>Valuation Note</td>
+ <td>Instructions</td>
</tr>
</thead>
{% for cp in counterparties %}
@@ -38,8 +39,9 @@
<a href="mailto:{{cp.valuation_email3}}">{{cp.valuation_contact3}}</a>{% endif %}</td>
<td>{% if cp.valuation_contact4 %}
<a href="mailto:{{cp.valuation_email4}}">{{cp.valuation_contact4}}</a>{% endif %}</td>
- <td>{{cp.notes if cp.notes}}</td>
- <td>
+ <td style="width:50px">{{cp.notes if cp.notes}}</td>
+ <td>{%if cp.instructions %}<a href="{{url_for('list_counterparties', instr = cp.instructions)}}">
+ <span class="glyphicon glyphicon-file"></span></a>{% endif %}</td>
</tr>
{% endfor %}
</table>