You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: worksheet.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,23 +26,24 @@ First you're going to install the Flask package. Make sure you are connected to
26
26
27
27
## Building a basic Flask web application
28
28
29
-
Now you're going to set up the most basic web application with Flask and Python. You will be able to run a single web page and display some text on a web browser.
29
+
Now you're going to set up a basic web application with Flask and Python. You will be able to run a single web page and display some text on a web browser.
30
30
31
-
1. Return to the Terminal window and create a new folder in your document called `webapp`:
31
+
1. Return to the Terminal window and create a new folder called `webapp` by typing:
32
32
33
33
```bash
34
34
mkdir webapp
35
35
```
36
+
36
37
`mkdir` means "make directory": a directory is a folder. It can contain files and more folders.
37
38
38
-
1. Navigate into this directory using the `cd` command:
39
+
1. Navigate into this directory using the `cd` command and pressing **enter**:
39
40
40
41
```bash
41
42
cd webapp
42
43
```
43
44
`cd` means "change directory": you use it to enter a folder.
44
45
45
-
1. Flask applications can be run from a single file. Now create the file now using touch:
46
+
1. Flask applications can be run from a single file, so you need to create the file now using the touch command like this:
46
47
47
48
```bash
48
49
touch app.py
@@ -56,7 +57,7 @@ Now you're going to set up the most basic web application with Flask and Python.
56
57
```
57
58
The ampersand (&) on the end of this command tells it to open IDLE in a new process. Unlike a command like `cd`, this command doesn't "finish"until you close the IDLE window. Opening IDLE in a new process allows you to enter more commands into the Terminal without quitting IDLE.
58
59
59
-
1. Two windows will have opened. One is the Python shell, and the other is an empty window with `app.py`in the title bar. Click on the `app.py` window to focus on it. You'll write your application code here and any printed messages or errors will be shown in the Python shell.
60
+
1. An empty window with `app.py`displayed in the title bar will appear. You'll write your application code here and when you run your code any printed messages or errors will be shown in a Python shell window.
60
61
61
62
1. Now enter the following lines into the blank `app.py` window:
0 commit comments