aboutsummaryrefslogtreecommitdiff
path: root/budget/forms.py
diff options
context:
space:
mode:
authorJocelyn Delande <jocelyn@crapouillou.net>2015-08-20 10:33:43 +0200
committerJocelyn Delande <jocelyn@crapouillou.net>2016-06-15 10:20:37 +0200
commit2b071a1a3bc752bfaa0fd6c0b2d8f8460721d6d8 (patch)
tree72fcca608854117b3d87de95454f88bbb9260dd9 /budget/forms.py
parent789196721584ca4800e4236eee36955e78761346 (diff)
downloadihatemoney-mirror-2b071a1a3bc752bfaa0fd6c0b2d8f8460721d6d8.zip
ihatemoney-mirror-2b071a1a3bc752bfaa0fd6c0b2d8f8460721d6d8.tar.gz
ihatemoney-mirror-2b071a1a3bc752bfaa0fd6c0b2d8f8460721d6d8.tar.bz2
Add members weight in models and budget backend refs #94
Diffstat (limited to 'budget/forms.py')
-rw-r--r--budget/forms.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/budget/forms.py b/budget/forms.py
index 2dde57d..918e82a 100644
--- a/budget/forms.py
+++ b/budget/forms.py
@@ -152,6 +152,7 @@ class BillForm(Form):
class MemberForm(Form):
name = TextField(_("Name"), validators=[Required()])
+ weight = CommaDecimalField(_("Weight"), default=1)
submit = SubmitField(_("Add"))
def __init__(self, project, *args, **kwargs):
@@ -170,6 +171,7 @@ class MemberForm(Form):
# if the user is already bound to the project, just reactivate him
person.name = self.name.data
person.project = project
+ person.weight = self.weight.data
return person