Skip to content

Commit 5fc38da

Browse files
MVC Lego Final QA (#512)
* Final QA update of README * Rename folder to be consistent with use of Lego vs Legos * Lego! 🧱 --------- Co-authored-by: Martin Breuss <[email protected]>
1 parent 0b29ad7 commit 5fc38da

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
# Model-View-Controller (MVC) in Python Web Apps: Explained With Legos
22

3-
This folder contains a minimal Flask example app that supports the explanation of the MVC pattern in [Model-View-Controller (MVC) Explained – With Legos](https://realpython.com/the-model-view-controller-mvc-paradigm-summarized-with-legos/).
3+
This folder contains a minimal Flask example app that supports the explanation of the MVC pattern in [Model-View-Controller (MVC) Explained – With Lego](https://realpython.com/lego-model-view-controller-python/).
44

55
To run the app, you'll need to first install [Flask](https://flask.palletsprojects.com/), preferably into a [virtual environment](https://realpython.com/python-virtual-environments-a-primer/):
66

77
```sh
88
(venv) $ python -m pip install Flask
99
```
1010

11-
To create and see the SQLite database file, you can then run `create_db.py`:
11+
Then, you can start the Flask app by executing `app.py`:
1212

1313
```sh
14-
(venv) $ python create_db.py
14+
(venv) $ python app.py
1515
```
1616

17-
Finally, you can start the Flask app by executing `app.py`:
17+
When you make a request in your browser by typing the URL of your localhost and port 8000, you'll see how Flask renders the single view that this web app defines.
18+
19+
---
20+
21+
**Note:** The SQLite database file was created by running `create_db.py`. You can modify this file to change the content in the database. Then run the script to update the database:
1822

1923
```sh
20-
(venv) $ python app.py
24+
(venv) $ python create_db.py
2125
```
2226

23-
When you make a request in your browser by typing the URL of your localhost and port 8000, you'll see how Flask renders the single view that this web app defines.
File renamed without changes.

0 commit comments

Comments
 (0)