diff --git a/Code/renan/html_css_flask/9_flask/app.py b/Code/renan/html_css_flask/9_flask/app.py index 0ae965b9..be91659f 100644 --- a/Code/renan/html_css_flask/9_flask/app.py +++ b/Code/renan/html_css_flask/9_flask/app.py @@ -5,12 +5,22 @@ #localhost:5000/ @app.route('/') -def index(): - name = "Bill" - return render_template('index.html', name=name) +def index(): + return render_template('index.html') + + +#run flask app by below command inputs #$env:FLASK_APP= "app.py" +#py -m flask run +#You will need to run the flask app each time to refresh your page...1st kill your terminal by Ctrl + C then type py -m flask run + +#change the location of the webpage ..change the name from home to - /about +#previous route was just 5000/ which routed to index.html @app.route('/about') def about(): - return render_template('about.html') \ No newline at end of file + + return render_template('about.html') + + diff --git a/Code/renan/html_css_flask/9_flask/templates/index.html b/Code/renan/html_css_flask/9_flask/templates/index.html index 5ebd57bd..e4dcea3d 100644 --- a/Code/renan/html_css_flask/9_flask/templates/index.html +++ b/Code/renan/html_css_flask/9_flask/templates/index.html @@ -8,8 +8,8 @@
-Hello {{name}}
- +