autoformatter
This commit is contained in:
parent
4d248038c9
commit
c0c3ffca8c
15
app.py
15
app.py
@ -5,15 +5,18 @@ from wtforms.validators import DataRequired
|
|||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def hello_world():
|
def hello_world():
|
||||||
form = MyForm(meta={'csrf': False})
|
form = MyForm(meta={"csrf": False})
|
||||||
return render_template('index.html', form=form)
|
return render_template("index.html", form=form)
|
||||||
|
|
||||||
|
|
||||||
class MyForm(FlaskForm):
|
class MyForm(FlaskForm):
|
||||||
name = StringField('name', validators=[DataRequired()])
|
name = StringField("name", validators=[DataRequired()])
|
||||||
|
|
||||||
@app.route('/submit', methods=['GET', 'POST'])
|
|
||||||
|
@app.route("/submit", methods=["GET", "POST"])
|
||||||
def submit():
|
def submit():
|
||||||
print ("Success!")
|
print("Success!")
|
||||||
return render_template('index.html')
|
return render_template("index.html")
|
||||||
|
Loading…
Reference in New Issue
Block a user