aboutsummaryrefslogtreecommitdiff
path: root/src/web/forms.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2018-07-01 21:59:45 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2018-07-01 21:59:45 +0200
commite277c21a5abdf9a1cb7c06705a46d57b71a61003 (patch)
tree81395627c865784060174bf06031428e0b3ef573 /src/web/forms.py
parentUpdated Runtime for Heroku and Pipfile.lock (diff)
downloadnewspipe-e277c21a5abdf9a1cb7c06705a46d57b71a61003.tar.gz
newspipe-e277c21a5abdf9a1cb7c06705a46d57b71a61003.tar.bz2
newspipe-e277c21a5abdf9a1cb7c06705a46d57b71a61003.zip
Removed useless code.
Diffstat (limited to 'src/web/forms.py')
-rw-r--r--src/web/forms.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/web/forms.py b/src/web/forms.py
index 96953240..5e53946e 100644
--- a/src/web/forms.py
+++ b/src/web/forms.py
@@ -218,25 +218,3 @@ class InformationMessageForm(Form):
message = TextAreaField(lazy_gettext("Message"),
[validators.Required(lazy_gettext("Please enter a content."))])
submit = SubmitField(lazy_gettext("Send"))
-
-
-class RecoverPasswordForm(Form):
- email = EmailField(lazy_gettext("Email"),
- [validators.Length(min=6, max=35),
- validators.Required(
- lazy_gettext("Please enter your email address."))])
- submit = SubmitField(lazy_gettext("Recover"))
-
- def validate(self):
- if not super(RecoverPasswordForm, self).validate():
- return False
-
- user = User.query.filter(User.email == self.email.data).first()
- if user and user.enabled:
- return True
- elif user and not user.enabled:
- flash(lazy_gettext('Account not confirmed.'), 'danger')
- return False
- else:
- flash(lazy_gettext('Invalid email.'), 'danger')
- return False
bgstack15