> 本章配套：理论课 `theory/ch06.html`　·　PPT `slides/ch06.pptx`　·　练习 `exercises/ch06.html`

# lab08_app_factory_blueprints

App Factory & Blueprints。端口 **5116**　http://127.0.0.1:5116/

> 图文手册：**walkthrough.html**（配解释器 → 运行 → 每个页面，全部本机实拍）

## 1. Run

| 方式 | 操作 |
|---|---|
| PyCharm | 右上角运行配置选「lab08_app_factory_blueprints（5116）」→ 绿三角 |
| 双击 | `run.bat` |
| 命令行 | `..\.venv\Scripts\python.exe app.py` |

成功标志：`Running on http://127.0.0.1:5116`

## 2. Routes

| 地址 | 学到什么 |
|---|---|
| `/main/` | 蓝图 main 首页 |
| `/main/about` | 蓝图 main 关于页 |
| `/auth/login` | 蓝图 auth 登录页 |

## 3. Check

- [ ] PyCharm 右下角显示解释器，没有黄条
- [ ] 运行面板出现 `Running on http://127.0.0.1:5116`
- [ ] 上表每个地址都能打开，内容与 walkthrough 截图一致

## 4. Commands

```bat
cd lab08_app_factory_blueprints
..\.venv\Scripts\python.exe app.py
..\.venv\Scripts\python.exe -m flask --app app routes
```
