aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/models.py
diff options
context:
space:
mode:
authorLeo Mouyna <mouynaleo@gmail.com>2019-09-28 14:16:42 +0200
committerLéo Mouyna <leo.mouyna@macq.eu>2019-10-03 18:15:50 +0200
commitafc93531809913660c3e08b661bc3b1e4b3ddd2d (patch)
treed90d39baf7ed40ca7b9812a26744c4af7bad77ee /ihatemoney/models.py
parent1f539b5c0d6d68897bcdb4cdf1f3f81debac49a9 (diff)
downloadihatemoney-mirror-afc93531809913660c3e08b661bc3b1e4b3ddd2d.zip
ihatemoney-mirror-afc93531809913660c3e08b661bc3b1e4b3ddd2d.tar.gz
ihatemoney-mirror-afc93531809913660c3e08b661bc3b1e4b3ddd2d.tar.bz2
feat: Optional field 'external link' in bill form.
An optional field has been added to the bill form to add a link to a real bill. A new action button allow user to see this bill. Breaking change with Bill model update for database, a migration is needed. See issue #429.
Diffstat (limited to 'ihatemoney/models.py')
-rw-r--r--ihatemoney/models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ihatemoney/models.py b/ihatemoney/models.py
index 325cf57..48e16a7 100644
--- a/ihatemoney/models.py
+++ b/ihatemoney/models.py
@@ -327,6 +327,7 @@ class Bill(db.Model):
date = db.Column(db.Date, default=datetime.now)
creation_date = db.Column(db.Date, default=datetime.now)
what = db.Column(db.UnicodeText)
+ external_link = db.Column(db.UnicodeText)
archive = db.Column(db.Integer, db.ForeignKey("archive.id"))
@@ -340,6 +341,7 @@ class Bill(db.Model):
"date": self.date,
"creation_date": self.creation_date,
"what": self.what,
+ "external_link": self.external_link,
}
def pay_each(self):