diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2011-10-08 15:52:12 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2011-10-08 15:52:12 +0200 |
| commit | 75209aeed0140c804047b4f3466d329b9eb246b9 (patch) | |
| tree | 51cbe453bc31e3418e050f0e780ac99e3c57ba92 /budget/forms.py | |
| parent | 1338653bd2234a60eab368f58dcd8d2bcb3f3d6b (diff) | |
| download | ihatemoney-mirror-75209aeed0140c804047b4f3466d329b9eb246b9.zip ihatemoney-mirror-75209aeed0140c804047b4f3466d329b9eb246b9.tar.gz ihatemoney-mirror-75209aeed0140c804047b4f3466d329b9eb246b9.tar.bz2 | |
Add a password recovery feature. Fix #32
Diffstat (limited to 'budget/forms.py')
| -rw-r--r-- | budget/forms.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/budget/forms.py b/budget/forms.py index 499f382..cf5068b 100644 --- a/budget/forms.py +++ b/budget/forms.py @@ -87,6 +87,16 @@ class AuthenticationForm(Form): submit = SubmitField("Get in") +class PasswordReminder(Form): + id = TextField("Project identifier", validators=[Required()]) + submit = SubmitField("Send me the code by email") + + def validate_id(form, field): + if not Project.query.get(field.data): + raise ValidationError("This project does not exists") + + + class BillForm(Form): date = DateField("Date", validators=[Required()], default=datetime.now) what = TextField("What?", validators=[Required()]) |
