cellarspoon
3 years ago
No known key found for this signature in database
GPG Key ID: 3789458B3D0C410
1 changed files with
9 additions and
6 deletions
-
app.py
|
|
@ -5,15 +5,18 @@ from wtforms.validators import DataRequired |
|
|
|
|
|
|
|
app = Flask(__name__) |
|
|
|
|
|
|
|
|
|
|
|
@app.route("/") |
|
|
|
def hello_world(): |
|
|
|
form = MyForm(meta={'csrf': False}) |
|
|
|
return render_template('index.html', form=form) |
|
|
|
form = MyForm(meta={"csrf": False}) |
|
|
|
return render_template("index.html", form=form) |
|
|
|
|
|
|
|
|
|
|
|
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(): |
|
|
|
print ("Success!") |
|
|
|
return render_template('index.html') |
|
|
|
print("Success!") |
|
|
|
return render_template("index.html") |
|
|
|