# Jinja2 异常：未找到模板 index.html。

- **ID:** `python/flask-blueprint-template-not-found`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

Flask 蓝图的模板文件夹未设置或模板文件不在预期目录中。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   Set template_folder in Blueprint: bp = Blueprint('bp', __name__, template_folder='templates')
# Ensure templates/index.html exists in blueprint package
   ```
2. **** (85% 成功率)
   ```
   Use app.add_template_folder to add additional template directories
   ```

## 无效尝试

- **** — Blueprint defaults to app's template folder unless overridden. (60% 失败率)
- **** — render_template expects relative path to template folder. (80% 失败率)
