aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2019-05-19 15:16:39 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2019-05-19 15:16:39 +0200
commit3b95f524eae5a52d2f222461773e22915f1a77b6 (patch)
tree854dd1b6f5e823a1b5f306025d365cda49784933 /src
parentRemoved debug print (diff)
parenttypo (diff)
downloadnewspipe-3b95f524eae5a52d2f222461773e22915f1a77b6.tar.gz
newspipe-3b95f524eae5a52d2f222461773e22915f1a77b6.tar.bz2
newspipe-3b95f524eae5a52d2f222461773e22915f1a77b6.zip
Merge branch 'master' of gitlab.com:newspipe/newspipe
Diffstat (limited to 'src')
-rw-r--r--src/web/forms.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/web/forms.py b/src/web/forms.py
index cc1fc787..7b1893e2 100644
--- a/src/web/forms.py
+++ b/src/web/forms.py
@@ -27,7 +27,7 @@ __copyright__ = "Copyright (c) Cedric Bonhomme"
__license__ = "GPLv3"
from flask import flash, url_for, redirect
-from flask_wtf import Form
+from flask_wtf import FlaskForm
from flask_babel import lazy_gettext
from werkzeug.exceptions import NotFound
from wtforms import TextField, TextAreaField, PasswordField, BooleanField, \
@@ -39,7 +39,7 @@ from web.controllers import UserController
from web.models import User
-class SignupForm(Form):
+class SignupForm(FlaskForm):
"""
Sign up form (registration to newspipe).
"""
@@ -68,14 +68,14 @@ class SignupForm(Form):
return validated
-class RedirectForm(Form):
+class RedirectForm(FlaskForm):
"""
Secure back redirects with WTForms.
"""
next = HiddenField()
def __init__(self, *args, **kwargs):
- Form.__init__(self, *args, **kwargs)
+ FlaskForm.__init__(self, *args, **kwargs)
if not self.next.data:
self.next.data = misc_utils.get_redirect_target() or ''
@@ -123,7 +123,7 @@ class SigninForm(RedirectForm):
return validated
-class UserForm(Form):
+class UserForm(FlaskForm):
"""
Create or edit a user (for the administrator).
"""
@@ -144,7 +144,7 @@ class UserForm(Form):
return validated
-class ProfileForm(Form):
+class ProfileForm(FlaskForm):
"""
Edit user information.
"""
@@ -176,7 +176,7 @@ class ProfileForm(Form):
return validated
-class AddFeedForm(Form):
+class AddFeedForm(FlaskForm):
title = TextField(lazy_gettext("Title"), [validators.Optional()])
link = TextField(lazy_gettext("Feed link"),
[validators.Required(lazy_gettext("Please enter the URL."))])
@@ -193,12 +193,12 @@ class AddFeedForm(Form):
for cat in categories]
-class CategoryForm(Form):
+class CategoryForm(FlaskForm):
name = TextField(lazy_gettext("Category name"))
submit = SubmitField(lazy_gettext("Save"))
-class BookmarkForm(Form):
+class BookmarkForm(FlaskForm):
href = TextField(lazy_gettext("URL"),
[validators.Required(
lazy_gettext("Please enter an URL."))])
@@ -212,7 +212,7 @@ class BookmarkForm(Form):
submit = SubmitField(lazy_gettext("Save"))
-class InformationMessageForm(Form):
+class InformationMessageForm(FlaskForm):
subject = TextField(lazy_gettext("Subject"),
[validators.Required(lazy_gettext("Please enter a subject."))])
message = TextAreaField(lazy_gettext("Message"),
bgstack15