# werkzeug.routing.exceptions.BuildError: 无法为端点 'static' 构建 url，值 ['filename']。是否忘记指定值 ['filename']？

- **ID:** `python/flask-url-for-external-https`
- **领域:** python
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

调用 url_for('static', ...) 时未提供必需的 filename 参数，或端点名称拼写错误。

## 版本兼容性

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

## 解决方案

1. **** (98% 成功率)
   ```
   url_for('static', filename='css/app.css')
   ```
2. **** (85% 成功率)
   ```
   print([r.endpoint for r in app.url_map.iter_rules()])
   ```

## 无效尝试

- **** — Breaks asset links; static files 404 in production. (85% 失败率)
- **** — Ignores url_prefix and CDN configuration. (70% 失败率)
