diff --git a/hello.py b/hello.py index 2420ed6..134b9bf 100644 --- a/hello.py +++ b/hello.py @@ -3,11 +3,20 @@ """ from flask import Flask +from flask import render_template +from flask import request + app = Flask(__name__) @app.route('/') def hello_world(): - return 'Hello World!' + return render_template('index.html') + +@app.route('/answers/', methods=['GET','POST']) +def answers(name=None, age=None, fav=None): + return render_template('answers.html', name=request.form['name'], age=request.form['age'], fav=request.form['fav']) + if __name__ == '__main__': + app.debug = True app.run() diff --git a/templates/answers.html b/templates/answers.html new file mode 100644 index 0000000..787bd0d --- /dev/null +++ b/templates/answers.html @@ -0,0 +1,6 @@ + +{% if name and age and fav %} +
Input your name, age, and favorite softdes ninja please.
+ + + + diff --git a/templates/index.html~ b/templates/index.html~ new file mode 100644 index 0000000..c467483 --- /dev/null +++ b/templates/index.html~ @@ -0,0 +1,20 @@ + + + +Input your name, age, and favorite softdes ninja please.
+ + + + diff --git a/templates/login.html b/templates/login.html new file mode 100644 index 0000000..1d686a0 --- /dev/null +++ b/templates/login.html @@ -0,0 +1,7 @@ + +