{
  "id": "python/django-missing-staticfiles-dir",
  "signature": "django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATICFILES_DIRS setting to a list of paths.",
  "signature_zh": "配置错误：使用静态文件应用时未设置STATICFILES_DIRS为路径列表",
  "regex": "django\\.core\\.exceptions\\.ImproperlyConfigured:\\ You're\\ using\\ the\\ staticfiles\\ app\\ without\\ having\\ set\\ the\\ STATICFILES_DIRS\\ setting\\ to\\ a\\ list\\ of\\ paths\\.",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "STATICFILES_DIRS未配置或为空，导致静态文件查找失败",
  "root_cause_type": "generic",
  "root_cause_zh": "STATICFILES_DIRS未设置或为空，导致django.contrib.staticfiles无法定位静态文件目录",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "STATIC_URL仅定义URL前缀，不指定文件系统路径，静态文件仍无法找到",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Django默认只搜索应用内的static/目录，项目根目录需要显式声明",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "确保static目录存在且包含文件，重启开发服务器",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}