diff options
Diffstat (limited to 'python/Dawn')
| -rw-r--r-- | python/Dawn/models.py | 3 | ||||
| -rw-r--r-- | python/Dawn/views.py | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/python/Dawn/models.py b/python/Dawn/models.py index 39a03ab8..1c2864ed 100644 --- a/python/Dawn/models.py +++ b/python/Dawn/models.py @@ -69,6 +69,9 @@ class BondDeal(db.Model): accrued = db.Column(db.Float, nullable = False) asset_class = db.Column(ASSET_CLASS) ticket = db.Column(db.String, info={'form_field_class': FileField}) + principal_payment = db.Column(db.Float) + accrued_payment = db.Column(db.Float) + counterparty = db.relationship(Counterparties) __table_args__= (db.CheckConstraint('cusip is not Null or isin is not Null'),) diff --git a/python/Dawn/views.py b/python/Dawn/views.py index a7b3a0e5..78333d6f 100644 --- a/python/Dawn/views.py +++ b/python/Dawn/views.py @@ -37,7 +37,8 @@ class BondForm(ModelForm): class Meta: model = BondDeal include_foreign_keys = True - exclude = ['dealid', 'lastupdate'] #we generate it with a trigger at the server level + exclude = ['dealid', 'lastupdate', #we generate it with a trigger at the server level + 'principal_payment', 'accrued_payment'] @app.route('/trades/<int:tradeid>', methods=['GET', 'POST']) @app.route('/trades/', defaults={'tradeid': None}, methods=['GET', 'POST']) |
