# 'HttpResponse'对象不可调用在/home/

- **ID:** `python/django-httpresponse-not-callable`
- **领域:** python
- **类别:** type_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

返回HttpResponse实例但意外地将其作为函数调用。

## 版本兼容性

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

## 解决方案

1. **Return instance without extra parentheses** (95% 成功率)
   ```
   return HttpResponse('Hello')
   ```
2. **Use render shortcut** (90% 成功率)
   ```
   return render(request, 'template.html', context)
   ```

## 无效尝试

- **Using parentheses after HttpResponse** — HttpResponse() returns object, but extra () tries to call it again. (90% 失败率)
- **Misunderstanding function vs class** — View should return instance, not call it. (70% 失败率)
