{
  "id": "python/django-view-return-http-response",
  "signature": "TypeError: view must be a callable or a list/tuple in the case of include(). Received: <class 'dict'>",
  "signature_zh": "TypeError: 视图必须是可调用的或列表/元组（在include()的情况下）。收到：<class 'dict'>",
  "regex": "TypeError:\\ view\\ must\\ be\\ a\\ callable\\ or\\ a\\ list/tuple\\ in\\ the\\ case\\ of\\ include\\(\\)\\.\\ Received:\\ <class\\ 'dict'>",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "In urls.py, passing a dictionary to path() instead of a view function or include().",
  "root_cause_type": "generic",
  "root_cause_zh": "在urls.py中，向path()传递字典而不是视图函数或include()。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Does not make sense; path() expects a callable.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "May work but is not a clean solution; better to define a proper view.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Define a proper view function and pass it: path('url/', my_view)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Use include() with a URLconf module.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-11-08",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}