cleaned up Form->FlaskForm, for both import line and class *Form(FlaskForm)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from wtforms import SubmitField, StringField, HiddenField, SelectField, validators, Form
|
||||
from wtforms import SubmitField, StringField, HiddenField, SelectField, validators
|
||||
from flask import request, render_template
|
||||
from flask_wtf import FlaskForm
|
||||
from __main__ import db, app, ma
|
||||
|
||||
################################################################################
|
||||
@@ -22,7 +23,7 @@ class CovertypeSchema(ma.SQLAlchemyAutoSchema):
|
||||
################################################################################
|
||||
# Helper class that defines a form for covertype, used to make html <form>, with field validation (via wtforms)
|
||||
################################################################################
|
||||
class CovertypeForm(Form):
|
||||
class CovertypeForm(FlaskForm):
|
||||
id = HiddenField()
|
||||
name = StringField('Name:', [validators.DataRequired()])
|
||||
submit = SubmitField('Save' )
|
||||
|
||||
Reference in New Issue
Block a user