diff --git a/app/forms.py b/app/forms.py index 473c68a..0291d0a 100644 --- a/app/forms.py +++ b/app/forms.py @@ -4,4 +4,5 @@ from wtforms.validators import DataRequired class LoginForm(FlaskForm): address = StringField('FLO address', validators=[DataRequired()]) - submit = SubmitField('Sign In') \ No newline at end of file + submit = SubmitField('Search') + diff --git a/app/routes.py b/app/routes.py index 071581e..b6ca6ca 100644 --- a/app/routes.py +++ b/app/routes.py @@ -22,6 +22,11 @@ def login(): def example(): return render_template('example.html') -@app.route('/test') +@app.route('/test', methods=['GET', 'POST']) def test(): - return render_template('test.html') \ No newline at end of file + form = LoginForm() + if form.validate_on_submit(): + flash('Balance requested for address {}'.format(form.address.data)) + return 'string' + # return redirect(url_for('index')) + return render_template('test.html', form=form) \ No newline at end of file diff --git a/app/templates/example.html b/app/templates/example.html index caface3..ee25be3 100644 --- a/app/templates/example.html +++ b/app/templates/example.html @@ -74,7 +74,7 @@
-