# 模板不存在：myapp/index.html

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

## 根因

Django无法在模板目录中找到指定的模板文件

## 版本兼容性

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

## 解决方案

1. **** (95% 成功率)
   ```
   mkdir -p myapp/templates/myapp && 将index.html放入
   ```
2. **** (90% 成功率)
   ```
   'DIRS': [os.path.join(BASE_DIR, 'templates')]
   ```

## 无效尝试

- **** — 如果APP_DIRS=False，应用内模板不会被自动搜索 (70% 失败率)
- **** — Django默认只搜索应用内templates目录 (80% 失败率)
