#227 Replace Form with FlaskForm
Merged 3 years ago by frantisekz. Opened 3 years ago by frantisekz.

@@ -19,7 +19,7 @@ 

  

  """Forms used in the application"""

  

- from flask_wtf import Form

+ from flask_wtf import FlaskForm

  from wtforms import StringField, SelectField, BooleanField, IntegerField

  from wtforms import TextAreaField, PasswordField, ValidationError

  from wtforms.validators import DataRequired, Email
@@ -30,7 +30,7 @@ 

          raise ValidationError('You must propose the bug as either a blocker or a freeze exception')

  

  

- class BugProposeForm(Form):

+ class BugProposeForm(FlaskForm):

      bugid = IntegerField(u'Bug ID', [DataRequired()])

      bz_user = StringField(u'Bugzilla Login', [DataRequired(), Email()])

      milestone = SelectField(u'Milestone', [DataRequired()], coerce=int)
@@ -39,6 +39,6 @@ 

      justification = TextAreaField(u'Justification', [DataRequired()])

  

  

- class FasBugzillaForm(Form):

+ class FasBugzillaForm(FlaskForm):

      bz_user = StringField(u'Login', [DataRequired(), Email()])

      bz_pass = PasswordField(u'Password', [DataRequired()])

Didn't find mention in changelog, however, official docs ( https://flask-wtf.readthedocs.io/en/1.0.x/quickstart/#creating-forms ) mention FlaskForm.

Using Form object instead of FlaskForm causes crash with the latest Flask-WTF on validate_on_submit undefined for Form.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

¯\_(ツ)_/¯ OK, I guess...

rebased onto 9511f2d

3 years ago

Build succeeded.

Pull-Request has been merged by frantisekz

3 years ago
Metadata