diff --git a/__pycache__/hello.cpython-36.pyc b/__pycache__/hello.cpython-36.pyc new file mode 100644 index 0000000..4939ebd Binary files /dev/null and b/__pycache__/hello.cpython-36.pyc differ diff --git a/hello.py b/hello.py new file mode 100644 index 0000000..c670fde --- /dev/null +++ b/hello.py @@ -0,0 +1,14 @@ +from flask import Flask +from flask import render_template + +app = Flask(__name__) + +@app.route('/') +def hello_world(): + return 'Hello, World!' + + +@app.route('/hello/') +@app.route('/hello/') +def hello(name=None): + return render_template('hello.html', name=name) diff --git a/index.html b/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/templates/hello.html b/templates/hello.html new file mode 100644 index 0000000..b96b4fb --- /dev/null +++ b/templates/hello.html @@ -0,0 +1,7 @@ + +Hello from Flask +{% if name %} +

Hello {{ name }}!

+{% else %} +

VVVW

+{% endif %}