diff --git a/Projects/websites/flask_calculator/README.md b/Projects/websites/flask_calculator/README.md index d4025bb..1403cb7 100644 --- a/Projects/websites/flask_calculator/README.md +++ b/Projects/websites/flask_calculator/README.md @@ -44,7 +44,7 @@ Flask we will use for building the actual website. Requests we will use for debu ### Step 1 - Home Page -Create a file called `calaculator.py`. It's opening contents should contain: +Create a file called `calculator.py`. It's opening contents should contain: ```python from flask import Flask @@ -193,11 +193,11 @@ file called `html-add.html`. In that file write the following: ``` This may look a little weird to others who have done html before. But we're -actually going t use a special "templating syntax" in Flask so it can do +actually going to use a special "templating syntax" in Flask so it can do some things for us. The `{{ result }}` line for example, will be replaced by a variable we give called `result`. -To do this write the following function in you `calculator.py`: +To do this write the following function in your `calculator.py`: ```python from flask import Flask, render_template @@ -209,7 +209,7 @@ def add_html(num1, num2): return render_template('html-add.html', num1=num1, num2=num2, result=num1 + num2) ``` -Now restart the ap and in your browser go to `localhost:5000/number-html/4` +Now restart the app and in your browser go to `localhost:5000/number-html/4` You now have a slightly styled web page! @@ -255,7 +255,7 @@ def add_post(): ``` Rerun the application, but instead of going to the browser this time, -open up IDLE or a python terminal and run the following: +open up a REPR or a python terminal and run the following: ```pythonstub >>> import requests @@ -334,4 +334,4 @@ If you created POST routes for other operators, e.g. subtract, divide etc. You can use this same template for those routes. You just need to change the forms action. -If you can think of how you could do all of these in a single route. \ No newline at end of file +If you can think of how you could do all of these in a single route.